Did you enter your site into Google Console? If so, Google requires that you put either a script in the header or put a verification file in the root folder of your website, then clicking verify. Google's server would then go to your site and look for that file. If it is there, it proves that you own and have access to the site.