An XML (extensible markup language) sitemap contains a list of all the pages on a website. XML sitemaps make it easy for search engine bots to read, organize, and index the various pages.
When your site’s content is properly organized and indexed, search engines can display it when someone types a relevant search term into the search box. If you want your site to show up in the search results, a sitemap is essential.
Sitemaps are considered a technical aspect of SEO. While sitemaps don’t contain the keywords that people often associate with SEO, they are critical for reaching your target market.
Now that you know that these maps are important, it’s time to take the next step and learn how to make a sitemap.
How to Make a Sitemap: Everything You Need to Know
Because a sitemap is a technical part of SEO, many people are afraid to try to make one. They think it’s extremely difficult, but it’s much easier than you might think.
Let’s look at the process, and if these steps seem overwhelming, don’t worry. You will also learn which tools you can use to quickly and easily make a sitemap.
Step 1 — Create a Page Hierarchy
You need to begin by creating the page hierarchy for your sitemap. The homepage should sit at the top of the sitemap.
Put the top-level content under the homepage, and the second-level content underneath that. Follow that with the third-level content at the bottom of the map.
As you create the sitemap, make sure it has what is referred to as a shallow depth. That means it only takes three clicks to get to any page on the site.
Step 2 — Create the Code
Next, you need to include XML tags in each URL. This is easy to do if you use Sublime Text. This tool allows you to easily create XML files.
You also need to add additional code to each file. Each file must contain the location, date of last change, frequency of changes, and priority of the page.
The code will look similar to this:
Step 3 — Validate the Code
It’s important to check for errors before submitting your sitemap. Validate your sitemap with the XML Sitemap Validator before moving forward.
Step 4 — Add Your Sitemap to Your Website
You need search engines to have access to your sitemap. Find the root folder on your website and add the sitemap.
Then, find the robots.txt file inside of the roots folder and add the sitemap to it as well.
Step 5 — Submit the Sitemap to the Google Search Console
Your sitemap is ready, but now, you need to let Google know. Go to the Google Search Console and click on “Crawl” and then “Sitemaps.” Select “Add/Test Sitemap.”
It’s a good idea to run a second test to make sure the sitemap doesn’t have any errors. Then, just submit the sitemap.
Does this seem like too much work for you? Fortunately, you can make a sitemap using some tools that will make the process even easier.
Tools to Use to Make a Sitemap
If you conducted a quick online search, you would realize that there are lots of sitemap creators available. Of course, some are better than others. Here are three of the top tools you can use to create a sitemap.
Many people who want to know how to make a sitemap turn to the Yoast plugin. This plugin works with WordPress sites. Install the plugin, go to the SEO tab, and create the sitemap.
Google XML Sitemaps
The Google XML Sitemaps plugin is another excellent option if you have a WordPress site. This plugin even alerts the search engines when you post new content on your site.
If your website has less than 500 pages, you can make a sitemap for free with Screaming Frog. You input the URLs into the software, and it makes the coding changes for you.
What About Video, Image, and Blog Post Sitemaps?
Your videos, images, and blog posts also need to have a sitemap. You can create a separate sitemap or add them to your existing sitemap.
For images, you need to add an XMLNS declaration to the sitemap’s <urlset> tag. The code is:
To add videos to your sitemap, you need the URL and the title, description, play page URL, thumbnail URL, and raw video file location or the player URL.
Regarding blog posts, you can easily keep your sitemap updated with a sitemap tool. For instance, Yoast automatically updates sitemaps.
What Are Common Sitemap Mistakes to Avoid?
Now you know how to make a sitemap, but before you start, get details on the mistakes you need to avoid. This will help you get the full SEO benefits of your sitemap.
A compression error is a common problem when people make sitemaps. This occurs when Google cannot decompress and process the sitemap.
This is a simple fix. Compress the sitemap and submit it to the Webmaster Tools once again. That should fix the issue.
If you get this error but you know your sitemap isn’t empty, it’s likely due to improper tagging for the URLs.
This prevents Google from being able to read the sitemap. Go over the tags once again, fix the errors, and resubmit the map.
XML Declaration Allowed Only at the Start of the Sitemap
If you get this error, you likely have lines of blank space before the XML tag. Delete the blank space and submit again.
If you didn’t leave any blank space, look at your content management system. It is likely causing whitespace to appear.
CNG Digital Marketing Knows the Ins and Outs of SEO
You know how to build a sitemap and you understand why it’s so important. Still, you might not want to handle this task on your own.
If that’s the case, CNG Digital Marketing can help. We build sitemaps and provide other essential SEO services for our clients.
Contact us to learn more about how we can help your SEO skyrocket today.