This is a multisite implementation with sites under one tenant. There is no robots.txt file in the root.
This is what I have tried:
- I have cleared the content for
Robots content
field for all sites. On browsing the URL https://mysite.local/robots.txt, the content rendered is:
User-agent: *
Disallow: /
Disallow: /in/
Sitemap: https://mysite.local/sitemap.xml
Sitemap: https://mysite.local/in/sitemap.xml
Could not understand where the entry for Disallow: /in/
is coming from and why are there only 2 sitemap URLs when there are multiple sites.
- Added robots.txt file in the root with just this
Disallow: /includes/
. On browsing the URL https://mysite.local/robots.txt, the content rendered is:
User-agent: *
Disallow: /includes/
Sitemap: https://mysite.local/sitemap.xml
Sitemap: https://mysite.dev.local/in/sitemap.xml
- In each Site Settings'
Robots content
field, added the valueDisallow: /assets-<sitecode>/
. e.g.:Disallow: /assets-shared/
,Disallow: /assets-intl/
,Disallow: /assets-sg/
etc.
On browsing the URL https://mysite.local/robots.txt, the content rendered is:
User-agent: *
Disallow: /assets-in/
Disallow: /assets-intl/
Sitemap: https://mysite.local/sitemap.xml
Sitemap: https://mysite.local/in/sitemap.xml
The issue is not with publishing items as all sites are configured to master
.
I could not find the information I was looking for here. Please help me understand the following:
- Sitecore will only read either from CMS field or the robots.txt file and not both. Is that correct?
- If
Robots content
field is empty, Sitecore addsDisallow: /
as default. But this prevents Google bots from indexing and crawling the website.
Sorry, no idea on SEO things, but disallowing shouldn't be the default. Is that correct?
Is there any config setting that can prevent this, I mean,Robots content
is empty andDisalow: /
shouldn't be added. - As mentioned above,
Disallow: /in/
is being added and only two sitemap URLs added even when none of the CMS fields have those values. The system is reading CMS field only from the International & India Site Settings when there are other sites too.
So, what other places should I check to troubleshoot.
Using Sitecore 10.2