-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robots.txt should link to sitemap by default #4678
Comments
I think this needs a little more thinking for the multilingual case, but I agree in principle. |
How about List All Available Languages from the docs:
This output method tweaked to output the sitemap files satisfies the suggestion from Moz:
Things to check:
According to Moz inclusion of the sitemap in the |
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
Seems like a pretty simple feature. |
I took a look at this. Currently, since robots.txt is a template file, it doesn't have access to all the information it would need to know what sitemaps are available to link to. Whether it should point to a sitemap index file for multi-lingual sites yes, but otherwise there can be more than one sitemap file with Hugo's current implementation. This information is gathered when generating the sitemap, but otherwise not available under |
I suppose I have the choice of disabling the Hugo |
.Sitemap.Filename doesnt work inside robots.txt |
This feature is not implemented yet. See - Issue: gohugoio/hugo#4678 - Docs: https://gohugo.io/templates/robots/
For a template that respects people who didn't add a sitemap, this can work too
|
This works for multilingual sites
|
This doesn't work if Sitemap is disabled using |
I propose changing the default robots.txt layout to:
This will link to sitemaps by default, which is the common usecase.
The text was updated successfully, but these errors were encountered: