Test if your blog is already listed on Google
By searching on Google with following query, replace my blog url with yours:
1 | site:mutebardtison.github.io |
If there is no result but a prompt, it means your blog website is not listed yet:
Generate Sitemap
A sitemap is a file where you can list the web pages of your site to tell Google and other search engines about the organization of your site content. Search engine web crawlers like Googlebot read this file to more intelligently crawl your site.
Also, your sitemap can provide valuable metadata associated with the pages you list in that sitemap: Metadata is information about a webpage, such as when the page was last updated, how often the page is changed, and the importance of the page relative to other URLs in the site.
First, install plugin hexo-generator-sitemap with:
1 | $ npm install hexo-generator-sitemap --save |
Change url
in _config.yml
to your blog’s url and compile your blog:
1 | $ hexo g |
Then, there should be sitemap.xml
in public
folder under root directory.
After deployment with hexo d
, test by visiting https://mutebardtison.github.io/sitemap.xml.
We got:
Add robots.txt
The robots exclusion standard, also known as the robots exclusion protocol or simply robots.txt, is a standard used by websites to communicate with web crawlers and other web robots. The standard specifies how to inform the web robot about which areas of the website should not be processed or scanned.
Add robots.txt file to source
folder. My example is given here:
1 | User-agent: * |
Submit Sitemap to Google
Log in Google Search Console with your Google account.
Then, click ADD A PROPERTY
and enter your blog url.
After verifying ownership, we have blog successfully added:
Test robots.txt
file. Make sure there is no Errors or Warnings:
Add and submit sitemap.xml
:
After some time, your blog will be listed on Google: