Step Zero
- Can you find search result of your website?
- Go to Google and search
site:DomainName
- Voila!
Your search - site:hilyy.xyz - did not match any documents.
So no result yet, but there is a Google promotion infoTry Google Search Console
asking you "Do you own hilyy.xyz (current domain name for my website)? Get indexing and ranking data from Google." fromwww.google.com/webmasters/
- Click that info and get started
Step One - Get Started
Go to Google Search Console and login your Google account
You should be able to see this page, if not, click your website in upper-left corner, then click
Add property
We're gonna use URL prefix block in the right hand.
Enter the entire URL link of your website (including prefix https://), click
CONTINUE
Now, you should be able to see there are five verification method that you can use.
Step Two - Verification
Verification using HTML file (Not a good method, you can just skip it)
This is the recommended verification method, however, there is a small problem in using this verification method.
First, download the file and upload to your blog folder. The same folder with
_config.yml
andsource
folder, not in thesource
folder.Second, don't upload the file using hexo command. If you do so, you will see this warning.
Why does this happen? Go to your repository or
.deploy_git
, click the file you uploaded and compare it to the original file. The original file has one line only, however the file you uploaded using hexo has hundreds of lines that are auto-generated by hexo.How do we deal with this problem?
First method, manually upload your file into your repository. Of course next time you use
hexo d
command, the file will again be modified. But before that...Return to Google Search Console and click
DONE
, Voila! Ownership verified.However, I strongly suggest you use another method.
Is it safe to use this method?
So for this verification method, you can see that in the verification interface, there is an prompt saying
To stay verified, don't remove the file, even after verification succeeds.
Okay... It works for now but not guaranteed. Let's see if there are other methods.
But, how to delete this verification or add verification other methods?
Delete PROPERTY
- Do not get panicked.
- In the left panel, roll down, click
settings
and you will see theProperty settings
panel. - To add another verification, click
Ownership verification
, you can see there are another four verification methods that you can use. - To delete the verification, click
REMOVE PROPERTY
inProperty added to account
- However, you don't necessarily need to delete it if you want to use other verification methods as well
Another method using HTML tag
Go to the themes folder and open
_config.yml
There is already a "Google Webmaster tools verification" configuration
1
2
3# Google Webmaster tools verification.
# See: https://www.google.com/webmasters
google_site_verification:HTML tag is in the form of
1
<meta name="google-site-verification" content="blablablabla" />
Copy anything inside
content = "..."
and paste it into the_config.yml file
where I mentioned above.I think this is the best way to verify a hexo website, so I'm not gonna talk about other verification methods. Feel free to try for yourself!
Step Three - Sitemap (SEO)
What is a sitemap?
A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to more intelligently crawl your site. A sitemap tells Google which pages and files you think are important in your site, and also provides valuable information about these files: for example, for pages, when the page was last updated, how often the page is changed, and any alternate language versions of a page.
In short, upload your sitemap helps Google better crawl your site.
How do we generate a sitemap?
Install hexo-generator-sitemap
1
npm install hexo-generator-sitemap --save
Change the url in
_config.yml
1
2
3# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://hilyy.xyz/ # http://example.comAdd sitemap path in your
_config.yml
1
2
3# sitemap
sitemap:
path: sitemap.xmlGo to Google Search Console, in the left panel, click
Sitemaps
, enter your sitemap URL (same as the sitemap path in_config.yml
).SUBMIT
and you will see a record inSubmitted sitemaps
with the Status "Success".
Step Four - Wait...
- April, 2 - Ownership Verification Successful, Waiting...
- April, 4 - Search result about my home page only
- April, 6 - Another two search results of category "Yeyang" and "Information-Literacy".
- April,13 - 26 results in total, covers almost everything about my blog.