Ghost sitemap errors and setup

As of 2017, Blogging platform Ghost is generating automatically sitemap.xml and robots.txt. XML Sitemaps help search engines better index your site. Sitemaps are part of all major search engines including Google, Yahoo, Bing and Yandex. You can use an external sitemap generator (like ScreamingFrog) in order to generate this file that will contain all your posts ordered by date. For ghost you can try this address

yourblog.com/sitemap.xml

Add this address to search engines ( for example Google console) and everything will be working fine for future post.

Ghost sitemap: A network error occurred loading an XSL stylesheet.

Problem

This problem could be caused by incorrect ghost setup. I met this several times when the ghost installation was not complete.

Solution Setup your domain

Most probably your installation directory is:

/var/www/ghost/

or something similar. In case you have different installation directory, please use it and:

  • open the config.js file with your favorite text editor.

  • Locate the domain setup which should start around the 43th line of the config.js file with ### Production tag and change the following line:

      url: 'http://myghostblog.com',
    
  • Replace myghostblog.com with your actual domain name or IP address depending on how you would like to access your Ghost blog. This will fix the problem

Ghost sitemap not available Ghost 404 error

Problem

Trying to open myghostblog.sitemap.xml, getting a Ghost 404 error.

Solution

Check if the blog is password protected. In case this is true than the sitemap will not be available.

Related Article