Topic on Project:Support desk

Jump to navigation Jump to search

generatesitemap.php : How search engines should find XML and GZ files?

7 (talkcontribs)

With generatesitemap.php I created the following files:







All these files have -rw-r--r-- so they are accessible to be read by search engines, but I'd like to ask, after not finding clear information in this manual page:

How search engines should find XML and GZ files?

  • Should I link towards them from the HTML body of the homepage or sidebar menu?
  • In Google search console I can add just one file - should I add all 6 or just one?


Ciencia Al Poder (talkcontribs)

In google search console you should add site_dir/sitemap/ (the one with "index" in the name). It references all the others

You can also add a reference to the sitemap in the robots.txt file. See (talkcontribs)

Hello @Ciencia Al Poder

I understand that it's either the first option or the second and there is no point to use both;

I assume I'll personally use the Search Console option as my robots.txt already contains quite a lot of directives and also, using Search Console might have less chance for bias as robots.txt can be very "dynamic" while Search Consoles in general are, at least in my experience quite "static";

Yet, using robots.txt seems to me more global as it can effect a large number of search engines at once.

Ciencia Al Poder (talkcontribs)

You can use both options without problem. (talkcontribs)

Hello @Ciencia Al Poder I tried to paste a long comment here helping newcomers like myself dealing with this; because it included a link to Webmasters StackExchange I couldn't paste it so I pasted it in Project:Current issues asking for help pasting it here but my thread there was deleted.

It was deleted by @Clump in the blatant description of "nonsense"; I desire gave time writing and formatting this comment and I think I should at least get a copy of it somewhere if it is not pasted here,

Please help me with this,

AhmadF.Cheema (talkcontribs)

Apologies for the confusion.😕🙁 Posting the comment at Current issues was a little unusual.

The following is's comment with some slight modifications.

Hello to newcomers like myself; I did what Ciencia Al Poder suggested and the following output is what I get when I visit At the start I wasn't sure how crawlers would treat the .gz files but it seems to be generally okay as reported in the Webmasters' StackExchange session: Why does my sitemap have a “.gz” extension, and how can I edit it? (talkcontribs)

Thanks Ahmad,