How to make a sitemap
You’ve created a website and you are dying to get on Google. You’ve done some research and realized you need to create a sitemap. But you have no idea what that is or where to start. Thankfully, I’m here to help demystify all that for you. By the end of this you will know exactly how to make one and upload it too Google Search Console.
What is it?
A sitemap is simply a map of your website. More specifically it is a file that contains information about all the pages and files on your site. Google reads this file to help it crawl your site. It contains a lot of information to help Google understand the content and structure of your site: when a page was last updated, how many changes it’s gone through, if there are different versions of your page, and so on.
Do I really need one?
Yes you do! But, Googlebot does a great job finding and indexing sites using links from sites it’s already indexed, you quietly think to yourself. This is true, but that doesn’t help you if you have a new site and no links to it! That is where a sitemap comes in, on top of containing useful information Google needs, you can submit it to Google Search Console to let them know your site needs to be crawled.
On the other end you might be thinking, my site is established, and I have numerous links to my pages, so I don’t need one. This is also not true! A large site might lead Google to overlook new or updated pages. Your linking structure might not be optimized and could also lead to Googlebot getting lost.
So, the answer to whether or not you need a sitemap varies depending on your unique situation however, my favorite phrase says it best, it is better to have it and not need it, than it is to need it and not have it.
Lets build one
Sitemaps can be formatted several different ways, XML, Text, and RSS to name a few. Every format has a size limit, 50,000 URLs and an uncompressed size of 50MB. If, for some reason, you have more than 50,000 URLs on your site (or you like to stay VERY organized) you can create a sitemap index file. It is simply a file that directs Google to a list of your sitemaps. You can submit an index to Google in lieu of a single sitemap file.
The text version is simple enough to create. All you need to do is create a text file that has one URL per line. This file must be encoded using UTF-8 encoding and contain nothing but a list of URLs. A text sitemap might look like this
XML requires a bit more experience with coding. Here is an example of a simplified XML sitemap with only one URL
<!–?xml version=”1.0″ encoding=”UTF-8″?–>
If you want to know how to make a sitemap with XML from scratch head over to sitemaps.org. You’ll find more examples, and all the information you need.
If all this code sounds complicated and time consuming, then I have some great news for you! WordPress automatically creates a sitemap for you. In order to see your pre generated sitemap on WordPress simply navigate to yourwebsite.wordpress.com/sitemap.xml or if you have a custom domain, yourcustomdomain.com/sitemap.xml.
Submit it to Google
You now know how to make one but the question remains, how do I show it to Google? Fear not, assuming you have already set up search console, this final step is wicked easy. First log into search console and open the main menu (three horizontal bars in the top left corner). Make sure you select the property(website) the sitemap belongs to. Once you’ve done that the left side of the dashboard will look like this.
Select ‘sitemaps’, you will then be brought to the sitemap page and at the top will be a box to add a sitemap.
Type in your sitemap url, thank WordPress for making your life easy, and press enter.
Congratulations, you’ve gone from knowing nothing about sitemaps to successfully submitting one to Google.