What is the “301 Redirects in Sitemaps” Issue?
A “301 Redirect” in the context of web development is a status code that indicates a permanent redirection from one URL to another. When a 301 redirect is used, it informs search engines and web browsers that the original URL has been permanently moved to a new URL, and all the value (such as link equity) should be transferred to the new URL.
Including 301 redirects in sitemaps means that the XML file of a website contains URLs that are permanently forwarded to new URLs. Sitemaps are files that provide information about the pages, videos, and other files on a site, and the relationships between them. Search engines like Google use it to crawl websites more effectively.
What Triggers This Issue?
It happens when URL addresses on your navigation map return an HTTP “Redirect” status (3XX). Therefore a “301 Moved Permanently” error message can be triggered by the following reasons:
- The destination URL is not linked properly, or URLs are broken.
- The website or the page is new.
- There are some problems with custom code.
- The URL of an old webpage has been updated, and the link now redirects to another page.
Search crawlers were confused because the sitemap contains the old and the updated addresses of the same page.
How to Check the Issue
To determine if a 301 error is included in your XML sitemap, you can use one of the free third-party tools — redirect-checker, httpstatus, and others. Another way is to download your navigation map and use a filter to find out if any lines contain a 301 status code. You can also check it manually by yourself: go to the URL bar of your website and find https://, delete “s,” and click on “Enter” once there is only http:// left in the beginning. If the website redirects to https://, then there are no issues with this particular page.
When examining your website through a Site Audit on Sitechecker, one of the key checks performed is to identify any “3xx redirects in XML sitemaps.” This is crucial as it helps pinpoint which pages intended for indexing are instead redirecting to different locations, which can cause confusion for search engines and impact your site’s SEO performance.
When you select the ‘View issue’ option for “3xx redirects in XML sitemaps,” the tool presents a comprehensive list of the pages affected. This list includes each page’s URL along with their redirect target, the type of redirect (such as 301 or 302), and the page weight, which is an indicator of the page’s significance based on traffic and link metrics. Addressing these issues is essential because search engines like Google use the XML sitemap to understand your site structure and to index content more efficiently. Redirects within this sitemap can lead to issues with how your content is indexed and served to users in search results.
Optimize Your XML Sitemaps!
Discover and fix 3xx redirects in your sitemap for seamless site indexing.
How to Fix the Issue
Fixing the issue of 301 redirects in sitemaps involves several steps. Here is a detailed guide to help you address this:
1. Online/Offline Tools
Identify URLs with 301 Redirects in Your Sitemap via Sitechecker or other similar tools.
2. Update Your Sitemap
Once you have identified the URLs that are 301 redirected, update your navigation map to replace these links with their new, final destinations.
Steps:
- Open Your Sitemap File: This is usually an XML file, often named sitemap.xml.
- Edit the File: Replace the old URLs with the new URLs that the 301 redirects point to.
- Validate the Sitemap: Use an XML sitemap validator to ensure there are no errors in your updated sitemap.
3. Remove Old URLs
Ensure that the old URLs (which are being redirected) are removed from your sitemap.
Steps:
- Locate Old URLs: Find the URLs that are currently in your sitemap but are being redirected.
- Delete Old URLs: Remove these URLs from the sitemap.
4. Update Robots.txt (If Needed)
Ensure that your robots.txt file is not blocking any of the new URLs or sitemaps.
5. Re-submit the Updated Sitemap to Search Engines
After updating your navigation map, submit the updated version to search engines to help them re-crawl your site.
Steps:
1. Google Search Console:
- Go to the Sitemaps section.
- Enter the link of your updated sitemap.
- Click on “Submit.”
2. Bing Webmaster Tools:
- Navigate to the Sitemaps section.
- Submit the updated sitemap link.
6. Verify 301 Redirects
Make sure that your 301 redirects are properly set up on your server.
Steps:
- Server Configuration: Check your .htaccess file (for Apache servers) or equivalent configuration file (for Nginx servers) to ensure that the 301 redirects are correctly implemented.
- Testing: Use tools like curl or online redirect checkers to verify that your redirects return a 301 status code and point to the correct new links.
7. Monitor Your Site
Keep an eye on your site’s performance and indexation status to ensure everything is working smoothly.