Duplicate sitemaps | WordPress.org

[ad_1]

Hello!

There are unlimited sitemaps: /sitemap.xmlanything also works.

The optimized sitemap endpoint is /sitemap.xml.
The optimized sitemap’s stylesheet endpoint is /sitemap.xsl.

The compatibility sitemap endpoint is /sitemap_index.xml. This is for hosts that implemented Yoast SEO’s mal-intended vendor lock-in NGINX rewrite rules.

Anything you add to the endpoints above is there for compatibility with translation plugins.

Lastly, the not-optimized sitemap endpoint is /wp-sitemap.xml (available if the optimized sitemap is disabled).

Search engines are pointed to the original endpoint with any compatibility fluff added to it (if necessary) via the /robots.txt output. They may get redirected to the /sitemap_index.xml on misconfigured websites (often hosted via Namecheap, EasyWP, and SpinupWP), which they’ll then use.

When you submit a sitemap to Google Search Console and Bing Webmasters, you only need to submit one link — I recommend not submitting the compatibility version if the original endpoints are reachable. If you have a translation plugin active (WPML, Polylang, etc.), you may want to submit a sitemap of each translation for faster (re)indexing.

I hope this explains everything 🙂 If you want to learn more about when you should(n’t) use a sitemap, please see .

Thanks for the explanation, @cybr. It helped me realize I had the /sitemap_index.xml version included in the robots.txt instead of the /sitemap.xml

I’ve also noticed that the homepage URL in the sitemap is formatted as url.com/ (with the slash symbol at the end). I’m using the custom permalink structure /%postname% without the slash. All the blog posts in the sitemap don’t have the slash symbol at the end. Shouldn’t the homepage URL be without the slash as well?

Thanks!

Anytime!

The root URL must always have a slash at the end. If it’s missing, it’s implied.
That’s because a URL always has a path, and a path always starts with a /.

It’s a bit more complex than that, which the contributors at Wikipedia did an excellent job of explaining. Here’s a direct link to their text.

@cybr Ah, that’s good to know. So when somebody links to my homepage, they should always use a / at the end then, right? Will linking to my homepage using the URL version without a slash have any undesirable SEO consequences?

The slash isn’t required; it’s simply always there. I found the specification:

An empty abs_path is equivalent to an abs_path of “/”.

It’ll automatically be added by the browser or server when it’s missing — at least when they’re developed according to the specification.

Leaving out the slash could lead to bugs, such as what happened with Google Search Console back in 2019, where they Google Search Console thought the homepage URL in the sitemap was missing.. Another instance I recall is where Google Search Console thought the homepage’s canonical URL didn’t lead to an existing page even though it pointed to itself.

These bugs often come from developers working at Google for some mysterious reason.

Though, with the correct canonical URLs TSF and WordPress generate for the homepage (i.e., including the slash), you shouldn’t worry about this. You can omit the “/” if you so desire, as long as they remain enforced in the sitemap and canonical URLs for the homepage.

Thanks so much for the explanation, @cybr 🙂

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer