How to create an XML sitemap

One of the most important aspects of optimising your website is through the creation of an XML sitemap. Sitemaps do not just give search engines a blueprint of your website’s layout, they also provide valuable meta-data. This  includes information such as how often your site is updated, when was the last change you made and how your pages are linked with each other.

Sitemaps are also important for websites that have a lot of archived content which aren’t linked together and websites that have pages that lack external links. As its name clearly implies, sitemaps provide bots with a map of a website which helps them discover and index important pages.

Read on to learn a few tips on how to create and optimise your XML sitemap.

Automatically generate your sitemap using tools and plugins

It’s easy to generate a sitemap when you are utilising the right tools like the plugin Google XML Sitemaps. WordPress websites using Yoast can easily enable XML sitemaps with a simple installation of the plugin.

Alternatively, you can also code your sitemap manually by simply following the XML sitemap code structure. If you want to however implement an hreflang attribute, you will have to generate the XML sitemap of your website.

Submit the XML sitemap you’ve created to Google

You can easily submit your sitemap through the Google Search Console. From your console dashboard, click on crawl > sitemaps > test sitemap. It is ideal that you first test your sitemap to check for errors before you submit it to Google for indexing. This will ensure that your key landing pages will in fact be indexed by Google.

Ideally, you want to have the same number of pages indexed in comparison to the submitted pages. Submitting a sitemap to Google will help inform which pages you consider as a high priority for indexing. The primary benefit of submitting your sitemap to Google is to provide a deeper understanding of your website layout.

Always prioritise important pages in your sitemap

The key factor when it comes to ranking will always fall on the quality of your website. If your website is found at the tail end of thousands of low quality websites (backlink spam), search engines will devalue the quality score of your website, consequently showing your website less on searches.

Always make it a point to direct bots to essential pages of your website which are highly optimised and showcase lots of unique content containing images and videos. Through the addition of visitor comments and sharing can increase traffic and engagement on these pages also!

Only include canonical versions of your website URLs in your sitemaps

When you have multiple pages on your website that are quite similar like product pages for different colors of a single product, you can use the rel=canonical tag to let Google know which are your primary pages that it should crawl and index on search. This way, bots won’t have any difficulty discovering key pages and won’t rank the wrong pages over your more crucial pages.

Use Robots Meta Tags whenever possible

For pages you don’t want to be indexed, you will usually use the noindex – follow tag. This usually preserves link equity while at the same time preventing Google from indexing the specific page. This tag is most importantly useful for utility pages in your website that you don’t want to show up in search engine results pages.   

If you notice that unimportant pages are being indexed by Google at the expense of your priority pages, you can use robots.txt to block these pages.

Exclude noindex URLs in your sitemap

Don’t waste your digital marketing budget by adding noindex pages to your sitemaps – they have no business being part of your sitemap in the first place. When you are submitting noindex and blocked pages as part of your sitemap, the effect is simultaneously telling Google that these pages aren’t of the highest priority and to not index these pages. Inconsistency is one common mistake when optimising a sitemap.

Dynamic XML sitemaps are always the best for large websites

It’s impossible to monitor all meta data when you have a huge website, especially ecommerce websites with thousands of pages. What you can do is to set up rules logic which will help you determine when a certain page will be included as part of your XML sitemap. This will also let you monitor pages as they are changed from noindex to index, follow.

Use both RSS/Atom Feeds and XML Sitemaps

RSS / Atom feeds notify search engines when you have added content to your website or updated a few pages. Google usually recommends that you use both RSS/Atom feeds and XML sitemaps which gives search engines a better understanding of what pages should be updated and indexed. Including only fresh content in your RSS feed will allow search engines to find and index pages relevant to your users.

Set your modification times to update only when making significant changes to your website

Never try to trick Google and other search engines into re-indexing your site pages without making any major modifications or updates. This can be risky for your website and Google will have the option of starting to remove date stamps to your website if you they’re constantly updated without adding new value.

Don’t stress yourself out with setting priority pages

Sitemaps usually have a priority column where it tells search engines which pages are important. This however has been long debated and there have been observations where Googlebot actually ignores these priority settings.

Multiple sitemaps are always the best for websites with more than 50,000 URLs

Each sitemap is limited to only 50,000 URLs. While this is more than enough for most websites, some still require the creation of additional sitemaps. Large ecommerce websites are a common example where there is a need for more than one sitemap.

Ensuring that all important pages in your website are indexed in search engines is one of the most important factors in increasing your website search ranking and allows the work you perform both on and off page to be recognised by search engines. Always check that you have a functioning sitemap in place to achieve maximum visibility to your target audience.