R
R
RobShneider2022-03-21 17:58:50
Search Engine Optimization
RobShneider, 2022-03-21 17:58:50

Can sitemap.xml be stored in subfolders of a domain?

Usually, if a site has a subfolder site.ru/moscow, then its sitemap is located along the path site.ru/sitemap.xml , but I have the opposite case site.ru/moscow/sitemap.xml and so on for all cities of Russia. In general, each subfolder has its own separate sitemap.

How does this affect SEO? And what if each subfolder has its own robots.txt?

upd: and how to add such subfolders to the webmaster. Everything is clear with subdomains . Need for everyone. How about in this case?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikita Komissarov, 2022-03-21
@RobShneider

You can specify in robots.txt where your sitemap is located.
In addition, there can be several sitemaps. Robots.txt
example with sitemap.xml address

User-agent: *
Allow: /
Sitemap: https://site.ru/sitemap.xml
Sitemap: https://site.ru/moscow/sitemap.xml

The search engine works with only one robots.txt located in the root of the site
( https://example.com/robots.txt )
What are the requirements for robots.txt:
  • File size does not exceed 500 KB
  • This is a TXT file called robots.txt
  • The file must be placed in the root directory of the site
  • The file must be accessible to robots - the server hosting the site responds with an HTTP code with a status of 200 OK
  • You can specify up to 500 sitemap.xml files, up to 50,000 links in each of them

What are the requirements for sitemap.xml :
  • The file must be encoded in UTF-8
  • The maximum number of links is 50,000 (It is written above how to split a large sitemap.xml)
  • The maximum uncompressed file size is 50 MB
  • Specify links to pages only of the domain where the file will be located
  • Host the file on the same domain as the site it was created for
  • When accessing a file, the server should return HTTP code 200

P
Puma Thailand, 2022-03-21
@opium

Sitemaps can be as you like
Robots will look at the search engine only at the root Am all the rest will simply ignore

A
Alexander Denisov, 2022-03-22
@Grinvind

A sitemap file can be placed anywhere on the site, but it only affects directories below the parent directory. Therefore, if you need the action of the Sitemap file to extend to all sections of the site, we recommend placing it at the root level.

https://developers.google.com/search/docs/advanced...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question