In this post, I’ll unravel the steps to set up a sitemap in WordPress, helping you boost your website’s SEO and make sure all your content gets the attention it deserves.
Have you ever wondered why some of your pages don’t show up in search results?
It actually comes down to two things…
One, the relevancy of your content and how search engines decide to index it.
Two, you guessed it, by having a solid sitemap game.
Because a sitemap is like a map for search engines, guiding them to every nook and cranny of your site.
By reading this guide, you’ll learn what a sitemap is, why it’s crucial for your site’s success, and how to create and submit one effortlessly.
I’ll cover everything from the basics to advanced tips, ensuring you have a comprehensive understanding. Whether you’re a WordPress novice or a seasoned pro, this guide has something valuable for you.
Imagine your website ranking higher on search results and more users finding your content.
That’s what a well-crafted sitemap can do for you.
Let’s dive right in…
What is a sitemap?
Before you set up a sitemap in WordPress, it’s a good idea to know what a sitemap is.
It’s actually pretty simple…
A sitemap is a file that lists all the pages, posts, and other content on your website.
It serves as a roadmap for search engines like Google, Bing, and others, helping them understand and navigate your content more effectively.
And you’ll have a better chance of ranking if the search engines knows what’s on your site.
There are two primary types of sitemaps:
- XML Sitemaps: These are structured specifically for search engines. An XML sitemap lists the URLs of a website and provides additional metadata about each URL, such as when it was last updated, how frequently it changes, and its relative importance within the site. This helps search engines crawl your site more intelligently and efficiently.
- HTML Sitemaps: These are designed for human visitors. An HTML sitemap is a web-page that lists all the pages on your site, often organized hierarchically. This type of sitemap can help visitors find specific pages more easily, especially on larger sites. I bet you’ve seen this one a few times on eCommerce sites.
As you probably can understand sitemaps are crucial because they:
- Ensure all your important pages are indexed by search engines.
- Improve the visibility of your content.
- Help search engines understand the structure and hierarchy of your website.
So don’t skip out on creating one…
By providing a clear structure, sitemaps ensure that search engines don’t miss any important content on your site, boosting your SEO and overall visibility online.
So if you’re serious about your blog, or online whatever it might be, create a sitemap.
Why do you need a sitemap?
Okay, you’re not convinced, I feel you.
Why spend your valuable time on creating this when search engines are already indexing your pages and posts…?
Let me aks you this:
How many of your pages actually show up in the search results?
Would it be worth 20 minutes of your time to ensure that Google knows about all your posts and pages.
If you want to rank better, get more visitors and convert more, then the answer is yes (if you ask me).
And here’s why you need to take your time to set this up:
SEO benefits
Improved indexing:
When you set up a sitemap for your WordPress site, you ensure that search engines can find and index all your important pages.
Without a sitemap, some of your content might be overlooked, especially if your site has a complex structure or includes many isolated pages.
Faster crawling:
By providing a clear map of your site, you help search engines like Google crawl your site more efficiently.
This means that new content can be indexed quicker, keeping your site’s information up to date in search results.
Metadata inclusion:
Sitemaps allow you to include metadata about each URL, such as the last update date and change frequency.
This information helps search engines understand the importance and freshness of your content.
User benefits
Better navigation:
While XML sitemaps are mainly for search engines, HTML sitemaps can improve user navigation by providing a structured list of all the pages on your site.
This is especially useful for large websites with a lot of content like eCommerce sites.
Store sites typically have layers upon layers of products and categories that goes for miles, like an onion…but a website.
Enhanced UX (User Experience):
By making it easier for users to find the content they’re looking for, sitemaps can enhance the overall user experience on your site.
Additional advantages
- Error detection: Sitemaps can help identify and highlight errors in your site structure, such as broken links or isolated pages. Addressing these issues can improve both SEO and user experience.
- Boost for new websites: For new websites with few backlinks, a sitemap is essential. It helps search engines discover and index your content faster, giving your site a better chance to appear in search results early on.
In essence, these maps are like a backstage pass for search engines and users, offering a sneak peek into the structure and content of your site.
Now that you know why you need it, it’s about time that we set up a sitemap for your awesome WordPress site.
Preparing your WordPress site
Before diving into creating a sitemap, it’s essential to get your WordPress site ready.
Here’s how you do that:
Step #1: Update WordPress
Make sure your WordPress installation is up to date.
Running the latest version ensures you have the newest features and security improvements.
Step #2: Choose the right plugins
There are several plugins available to help create a sitemap.
Some of the most popular ones include Yoast SEO (my favorite), All in One SEO, and Google XML Sitemaps.
Decide which one you’ll use based on your needs. I think Yoast SEO does the job pretty well of combining SEO skills and sitemaps, plus you can get started for free.
So win-win situation.
Step #3: Check site settings
Ensure your site’s visibility settings are correctly configured.
Go to Settings > Reading in your WordPress dashboard and make sure the “Discourage search engines from indexing this site” option is unchecked.
Step #4: Backup your site
It’s always a good idea to backup your site before making significant changes.
Better safe than sorry.
This step ensures that you can restore your site to its previous state if anything goes wrong.
You can use plugins like UpdraftPlus or SolidBackups to create a complete backup of your site.
Read my entire guide on how to do a backup of your site for a detailed instruction.
How to set up a sitemap in WordPress
Creating a sitemap in WordPress is a breeze, especially when you use plugins.
And using plugins to do this is by far the easiest way to get things right.
If you know me even a little bit, you know that I like to use Yoast SEO for my SEO endeavours.
And luckily for us, Yoast also have a function for setting up sitemaps in WordPress.
So, here’s how you set things up step-by-step.
Step 1: Install and activate Yoast SEO
The first step is obviously to install and activate Yoast SEO.
To do that, start by logging in to your WordPress dashboard.
From there head over to “Plugins” then “Add New Plugin”.
With the plugins menu open, do a search for “Yoast SEO”.
The first result that appears is the one to install.
Now, click on “Install” then “Activate” to activate the plugin.
Step 2: Disable the Jetpack sitemap
Before you do anything, make sure to turn off the sitemap generated by Jepack, you don’t need two.
To do this, head over to Jetpack in the left menu, then “Settings”.
Then go to the “Traffic” tab and scroll down until you see “Sitemaps”.
Now disable this setting.
Step 3: Configure Yoast SEO sitemaps
Now it’s time to use Yoast SEO to set up a sitemap for your WordPress site.
First, head over to “Yoast SEO” then “Settings” and scroll down to the bottom.
From here, simply enable the “XML sitemaps” feature and save your changes.
To configure what your sitemap is supposed to contain, I recommend that you read this guide right here.
Step 4: View your sitemap
To view your sitemap, go to Yoast’s “Settings” menu, scroll to the bottom and click on “View the XML sitemap”.
A new window will now show your sitemap.
Or if you want to visit the sitemap directly, go to: https://yourdomain.com/sitemap_index.xml
.
By the way, save this URL for when it’s time to submit the sitemap to Google Search Console.
Advanced SEO best practices for sitemaps
Lastly I want to talk about some SEO best practices for sitemaps.
I don’t know how much technical know-how you have when it comes to fiddling with files inside your website.
The reason why I ask this is because this tip requires you to poke around in the root files of your site.
Anyway, what is this SEO pro tip?
Well it’s about adding your sitemap into your robots.txt file, it it doesn’t already exists there.
To check if it exists, go to https://yoursite.com/robots.txt and look for the line called:
Sitemap: https://yoursite.com/sitemap_index.xml.
If this exists then you’re good, no need to worry, but if it doesn’t hear me out.
First, what is robots.txt exactly?
A robots.txt file is a standard used by websites to communicate with web crawlers and other web robots. It serves as a guide to inform these automated crawlers which parts of the site they can visit and index, and which parts are off-limits.
See how this can be beneficial?
By specifying rules within the robots.txt file, you can control the access of web crawlers to certain directories, files, or pages, which can help manage server resources and protect sensitive information.
And this file needs to be placed in the root directory of your website.
Adding your sitemap to your robots.txt file.
If you doesn’t feel confident that you can edit root files without breaking your site, then ask your domain host provider for help.
However, if you feel confident enough that you can edit files in your root directory then here is how you do it.
I’ll be honest, I was a bit scared when changing this file, but it turned out to be easier than expected.
First, log in to your web-host dashboard, in my case it’s Bluehost.
Then click on “Hosting” in the left side menu.
From there click on “Cpanel” under quick links.
Now, look under the “Files” section, and click on “File Manager”. This will open a new window.
Once there look in the left side menu for “Public HTML” and click on it.
Now find the file and right click on the file called “robots.txt”.
Choose “Edit” in the dropdown menu. It will prompt you to backup the file just in case something goes bad. (I didn’t do it because this is such an simple add on).
Backup or not, click the “Edit” button when you’re ready. This will open a new window.
In this new window add the following line:
Sitemap: https://yoursite.com/sitemap_index.xml
And once you’re done, click “Save Changes”, and that’s it. You’ve now both set up a sitemap for your WordPress site as well as adding it to robots.txt.
Now robots and crawlers will have a much easier time finding your sitemap, meaning that it will be easier it index.
Great work, high five.
Submitting your sitemap to search engines
Once you’ve set up your sitemap for your WordPress site, the next step is to submit it to search engines.
This simple task ensures that your content get indexed quickly and accurately, which is good.
And by following these steps, you’ll ensure your content is easily discoverable and ranked appropriately.
So let’s get to work…
Step 1: Sign in to Google Search Console (GSC)
Start by heading over to Google Search Console.
Once there, sign in with your Google account.
Oh, and if this is your first time here, you’ll need to create that and verify your site. Simply follow the instructions from Google.
Step 2: Add your website
The first thing you need to do is to add your website to the platform.
This is very easy thing to do.
Start by clicking on the dropdown in the left upper corner (if your new here, you’ll be prompted to add a property).
When the popup opens, add your domain address in the field under the “Domain” option. Then click “Okay” and the property setup will begin.
Now, just follow along the verification process, Google will guide you through it all, ensuring that everything get set up properly.
Step 3: Submit your sitemap
Now that your website is added as a property inside Google Search Console, you can add your sitemap.
Start by heading over to “Sitemaps” in the left hand menu.
Now enter the URL of your sitemap in the field under “Add new sitemap”.
If you’re using Yoast SEO, this URL will look like this: https://yourdomain.com/sitemap_index.xml.
And if you look closely, you only have to add the last part e.g. sitemap_index.xml.
Click “Submit” and Google will start processing your sitemap.
It doesn’t have to be harder that that.
Step 4: Check sitemap status
After submitting your sitemap, check the status to ensure there are no errors.
Typically, there will be no errors here if you’ve set up everything properly.
Also, in time Google Search Console will provide updates on how many pages have been indexed and any issues detected.
That way, you can easily see what pages and posts are indexed and which aren’t. (Or in my case a while back, how many posts that wasn’t indexed).
Troubleshooting common issues
Even with the best preparations, setting up a sitemap can sometimes present a few hiccups.
Here’s how to troubleshoot common issues you might encounter and how to solve them.
Errors in your sitemap
Sitemap not detected by search engines
Issue: Your sitemap isn’t being picked up by Google or Bing.
Solution: Double-check the URL you submitted. Make sure it is correctly formatted and accessible. Test the URL in your browser to ensure it loads properly.
If the problem persists, resubmit the sitemap in Google Search Console or Bing Webmaster Tools.
Format errors
Issue: Search engines report format errors in your sitemap.
Solution: Ensure your sitemap adheres to the XML format specifications. Use online validators like the W3C XML Validator to check for syntax errors.
Plugins like Yoast SEO typically handle this automatically, but manually made sitemaps might need a closer look.
Incorrect pages listed
Issue: Your sitemap includes pages that shouldn’t be indexed or excludes important pages.
Solution: Review the settings of your sitemap plugin. In Yoast SEO or All in One SEO, you can manage which post types and taxonomies are included.
Exclude pages like admin URLs, duplicate content, or any low-quality pages.
Slow sitemap loading
Issue: Your sitemap takes too long to load, causing search engines to time out.
Solution: Optimize your website’s performance. Use caching plugins, optimize images, and reduce server load.
Also ensure your sitemap is not being blocked by your robots.txt file.
Sitemap not detected
Check robots.txt file
Issue: The robots.txt file might be blocking access to your sitemap.
Solution: Go to yourdomain.com/robots.txt and ensure there is no Disallow directive preventing search engines from accessing your sitemap.
To fix this, head back to the earlier section on advanced SEO best practices for sitemaps.
Verify search console and webmaster tools settings
Issue: Incorrect settings in Google Search Console or Bing Webmaster Tools.
Solution: Revisit your settings in these tools and ensure your sitemap URL is correctly submitted. Sometimes, simply re-submitting can resolve detection issues.
Handling errors
Broken Links
Issue: Your sitemap contains broken links.
Solution: Regularly audit your site for broken links using plugins like Broken Link Checker.
Fix or remove broken links to ensure your both your site and your sitemap remains accurate and functional.
Duplicate Content
Issue: Duplicate content issues reported in your sitemap.
Solution: Use canonical tags to indicate the preferred version of a page.
Most SEO plugins can handle this automatically.
However, if you don’t use such a tool, always ensure that your sitemap only includes canonical URLs.
Now that you know how to handle some common issues that might arise when you set up your WordPress sitemap, you can feel confident adding one to your site.
Afterall a sitemap is a valuable asset for your website’s SEO game.
And by regularly monitoring and maintenance of your sitemap will help keep your site in top shape.
Sitemap best practices
Creating and submitting a sitemap is just the beginning.
To ensure your sitemap continues to benefit your site’s SEO and user experience, follow these best practices:
Keep your sitemap updated
Make sure your sitemap reflects the current state of your website.
Whenever you add new content, update your sitemap accordingly.
Typically this is not something you have to worry about since most SEO plugins, like Yoast SEO or All in One SEO, do this automatically.
How convenient, right?
Check and validate your sitemap
Every year or so, validate your sitemap using online tools like the W3C XML Validator. This helps catch any format errors or issues that might affect indexing.
It may happen that you get “Schema” error when using this tool, this is most likely nothing to worry about. The reason for this error is that W3C doesn’t have the sitemap schema predefined.
Also, keep an eye on your Google Search Console and Bing Webmaster Tools accounts.
They will notify you of any problems with your sitemap and provide insights into your site’s indexing status.
Monitor site performance
Use Google Search Console to monitor how many of your pages are being indexed.
Look for any patterns or issues that might indicate problems with your sitemap or site structure.
A word of advice here is that Google will almost never index all of your pages, that’s just the reality of it. It’s a bummer, I know.
You’ll most likely have 20 to 30% of your posts and pages indexed at once and it will wary which are indexed and not.
How Google decide to index pages is a jungle on it’s own, and something that will take far too long to explain here.
Optimize sitemap content
Prioritize key posts and pages:
Make sure your most important pages are included in your sitemap and are easily accessible.
In fact, use GSC to identify posts and pages that are ranking well and put some extra effort into them.
Add images, videos, update information, spice up the writing, anything to make the content even better.
Doing this will boost those posts even more leading to more visitors, comments and better rankings.
Aka. focus your efforts on what works and follow that path when creating new stuff.
This leads me into the next point, which is excluding low quality content.
Exclude low-quality content:
Avoid including pages that offer little value, such as tag archives, duplicate content, or thin content pages. This helps search engines focus on your most valuable content.
But you already know that you should only publish great content so that shouldn’t be a problem right?
Well…
Here’s the truth, some of the content you produce will never rank, and those posts should not get that much attention from you either.
Sure they can still be there, but don’t spend days updating them if they don’t receive traffic or rank.
This is why you need to read my guide on minimum viable blog post writing.
Where you basically start out writing for search engines to see what sticks. Then optimizing it for humans once it ranks.
However, sometimes it can be a good idea to delete some of your content for good. Like when you want to change the direction of your blog for example. But use this power with caution.
By following these simple best practices, you can ensure that your sitemap continues to enhance your site’s SEO and user experience effectively.
Conclusion
There you have it, a no-nonsense guide on ho to set up a sitemap in WordPress.
If you’ve made it this far, then you should now know just how important a sitemap is for enhancing your website’s SEO and ensuring all your content is easily discoverable by search engines.
To recap, here’s what you’ve learned:
- What a sitemap is.
- How to prepare your WordPress site for a sitemap.
- A step-by-step instruction on how to set up a sitemap in WordPress using plugins.
- How to submit your sitemap to Google and other search engines.
- Troubleshooting.
- And last, some best practices for creating a sitemap.
Once you’re sitemap is submitted and crawlers start to crawl it, you can expect to see an improvement in your site’s visibility and performance in search results.
You can also view how you site is performing in GSC, and see which pages Google ranks right now.
Now I’d like to hear from you:
Have you set up a sitemap for your WordPress site yet, and did you encounter any challenges during the process?
Let me know by leaving a comment below right now.