XML sitemaps · Sitemap URLs
Forbidden (403) URL in sitemap
The XML sitemap lists a URL below this page that returns 403 Forbidden, which wastes crawls and reduces search engines' trust in the sitemap.
How this page is built
/sitemap.xml lists this page and, straight after it, /tests/forbidden-403-url-in-sitemap/forbidden/. A Netlify redirect rule serves a plain error page at that address with a 403 status code. Nothing on the site links to it, so the sitemap is the only place it appears.
Why it matters
Every URL in a sitemap should return 200. A 403 tells search engines they are not allowed to see the page, so listing it asks them to crawl something they will be refused. When many sitemap URLs fail, search engines trust the sitemap less.
Forbidden URLs in a sitemap usually come from pages behind a login, or from a security rule that blocks crawlers.
How to check it
Crawl every URL in the sitemap and check the status codes. Crawl tools list sitemap URLs that return 403. Search Console’s page indexing report shows them too.
How to fix it
Remove pages that crawlers cannot access from the sitemap, or allow crawlers to fetch them if they should be indexed.