How to verify your site in Google Search Console?
Google Search Console is a free Google tool that shows you how your website is doing in Google Search: which pages Google has found, which search words bring visitors, and whether any page has a problem. Before Google shows you any of this, you must verify your site — that is, prove to Google that the website is really yours. Only the owner of a site is allowed to see its private search data.
This note walks through the HTML file upload method, which is the method this very website uses. It works for any website where you can put a file in the top folder — including a free GitHub Pages site like the one in How to create a free website at username.github.io?.
What you need before you start
- A Google account (the same one you use for Gmail, for example).
- A website that is already online, so Google can visit it.
- The ability to put a file in the top folder of that website.
On GitHub Pages, your website lives in a repository (GitHub’s
word for a project folder) named
username.github.io— for example, this website lives in the repositorypongyuenlam.github.io. The “top folder” is simply the first page you see when you open that repository on GitHub: the same place where yourindex.htmlsits. The verification file goes right next toindex.html, not inside any sub-folder.
The idea in one sentence
Google gives you a small file with a long, unique name; you place it in the top folder of your website; Google visits the address and finds the file. The file is not a secret — anyone can read it once it is online — but only someone who controls the website could have put it there, so Google finding it proves the site is yours.
Step 1: Add your site in Search Console
Go to search.google.com/search-console and sign in. Click Add property and choose the URL prefix option. Type the full address of your site, for example:
https://username.github.io
Replace username with your own GitHub username.
Step 2: Choose the HTML file method
Search Console offers several ways to verify. Choose HTML file. Google shows you a file with a long, random-looking name such as:
googlexx...html
Click the button to download it. Do not rename the file and do not change what is inside. If you open it, you will see it contains a single line of text, something like:
google-site-verification: googlexx...html
Step 3: Put the file on your website
The file must sit in the top folder of your site, so that its address is:
https://username.github.io/googlexx...html
To find that top folder on GitHub, open github.com/username first.
This is your profile page — it only lists your
repositories and does not show any files, so you will not find the verification
file there. Click the repository username.github.io. The first page
you now see — the file list with index.html in it —
is the top folder.
Use Add file → Upload files on that page to put the
verification file next to index.html, and commit the change. Then
wait the usual one to two minutes for the site to update.
Step 4: Check the file is reachable
Open a new browser tab and visit
https://username.github.io/googlexx...html (with your own username
and file name). If you see the single line
of text from Step 2, the file is in the right place. If you see a
“404 not found” error instead, wait a minute and refresh, or check
that the file really is in the top folder and not inside a sub-folder.
Step 5: Click Verify
Go back to Search Console and click Verify. Google visits the address, finds the file, and confirms you are the owner. Verification is immediate.
Do not delete the file afterwards
Google re-checks the file from time to time. If you delete or rename it, Google
may decide you are no longer the owner and your access to Search Console data
will stop. The file is tiny — just leave it where it is.
This website, for example, still keeps its own verification file
(googlexx...html) in its top folder for exactly this
reason.
Good to know
- Verification is free and only needs to succeed once.
- A Google Analytics tag alone does not verify your site.
- After verifying, ask Google to look at your pages by submitting your
sitemap.xmlin Search Console.
Further reading
- Verify your site ownership — Google’s official guide to all the verification methods.
- How to create a free website at username.github.io? — the website used as the example in this note.
- How to get a Google tag to understand the traffic to your website? — a companion step that shows who visits your pages.