Search…

X3 Photo Gallery Support Forums

Search…
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

How to set sitemap to noindex

29 Jun 2023, 05:50

My sitemap recently started showing up in search results. How can I set it to "noindex"?

Google suggests a meta tag or HTTP response header, but I have no idea how to do that.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: How to set sitemap to noindex

29 Jun 2023, 08:18

This issue is a bit unusual. I have never heard of Google indexing and displaying sitemaps, but even if it does, there is very little harm in that ... After all, sitemaps are made to be visible to both humans and search engines. May I ask, exactly what search I would need to make to find your page with sitemap? I am guessing you may have linked to it from somewhere, and I am also guessing it shows /sitemap/ and not sitemap.xml, because Google might treat the former as a "page".

We could add meta tag into the sitemap XML, but you can't easily do that from X3 as the page is rendered into cache. You would need to find the rendered cache php file, and edit it manually.

It's very unusual to add this meta into sitemap. Here is Apple's sitemap, plain and simple, not <meta> headers:
https://www.apple.com/sitemap.xml
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: How to set sitemap to noindex

29 Jun 2023, 09:27

As far as I know I have not linked to my sitemap anywhere, my SEO tool agrees.

You are right, Google actually lists /sitemap/ and not sitemap.xml. For whatever reason it ranks for "Businessporträts Offenburg" somewhere around 25th place. I already asked for removal in the Google Search Console, so maybe you won't be able to find it.

I just don't want potential costumers to land on such an obscure part of my website when they want something else.
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: How to set sitemap to noindex

29 Jun 2023, 09:29

mjau-mjau wrote: This issue is a bit unusual.
I only found a German source so far, but it doesn't seem to bit that unusual. https://www.seo-suedwest.de/4470-google ... etzen.html
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: How to set sitemap to noindex

29 Jun 2023, 10:07

I think my point was, I can't see that Google is indexing sitemap for most other websites, no matter if they have "noindex" or not (normally this is not a feature of XML). Mostly because it makes sense. Even though Google is well aware of sitemaps for apple.com and www.photo.gallery (because that's the point), it simply doesn't show them in search. Also, by what search phrase do you find the sitemap?
I think it is worth clarifying that your sitemap showing up as indexed is not an issue. The issue is when the sitemap shows in the search results when you type in a keyword relating to your site’s content.
https://www.thewebmaster.com/sitemap-in ... ty-issues/

Anyway, you could probably open .htaccess in text editor, and add this:
Code
<filesMatch "(sitemap\.xml|sitemap)">
Header set X-Robots-Tag "noindex"
</filesMatch>
 
metallissimus
Experienced
Topic Author
Posts: 331
Joined: 17 Oct 2019, 06:54

Re: How to set sitemap to noindex

29 Jun 2023, 12:40

mjau-mjau wrote: Also, by what search phrase do you find the sitemap?
Maybe you missed my first answer because of the double post, sorry for that.

Thank you for the link, interesting read. I simply can't understand how Google came to the conclusion the sitemap was more relevant to "Businessporträts Offenburg" than the actual page for exactly that: https://www.danielbollinger.de/angebot/ ... offenburg/
Anyway, you could probably open .htaccess in text editor, and add this:
Code
<filesMatch "(sitemap\.xml|sitemap)">
Header set X-Robots-Tag "noindex"
</filesMatch>
Thanks, I will do that!
www.danielbollinger.de – corporate photography
hochzeiten.danielbollinger.de – wedding photography
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: How to set sitemap to noindex

29 Jun 2023, 21:26

metallissimus wrote:Thank you for the link, interesting read. I simply can't understand how Google came to the conclusion the sitemap was more relevant to "Businessporträts Offenburg" than the actual page for exactly that:
To me, it kinda looked like the Google guy didn't really have a great explanation, and just came up with that as their best response.
metallissimus wrote:Google actually lists /sitemap/ and not sitemap.xml.
I am guessing this could be relevant. Google know that sitemap.xml is an XML file, and also the data-based sitemap, and should under most circumstances never list it in search (what would be the point?). However, an url /sitemap/ could be something else, like an actual web page created for humans with text content formatted for humans. X3 uses a sitemap.xsl, which is kinda like CSS for XML, so the output is better formatted for humans ... This might make Google (when it sees the page) to think that it's a "normal" page (although technically, it's still XML). It's still unusual that it gets indexed, but my thoughts.
metallissimus wrote:For whatever reason it ranks for "Businessporträts Offenburg" somewhere around 25th place. I already asked for removal in the Google Search Console, so maybe you won't be able to find it.
Can't currently find it for the specified search. Can only find it under "site:danielbollinger.de sitemap".
metallissimus wrote:I just don't want potential costumers to land on such an obscure part of my website when they want something else.
Agreed.