-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
The url of the sitemap should match the actual url #5324
Conversation
Signed-off-by: stam <[email protected]>
Deploy preview for using-drupal ready! Built with commit 3dbf64d |
Deploy preview for gatsbygram ready! Built with commit 3dbf64d |
Hmmm I wasn't aware that Gatsby forced URLs to be lowercase? I've built sites with uppercase URLs and it worked fine. Perhaps there's something else going on? |
thanks @KyleAMathews I checked and realized that redirection occurs only in production enviroment (Netlify). Also, I noticed that converting to lowercase should be done with my custom so, this PR has become useless, I close this. sorry to mess up.
|
Since gatsby forces the URL to be in lowercase letters, the URL of the site map must also be lowercase.
When use gatsby with markdowns, filename may contain UpperCase letter.
On this situation, gatsby-plugin-sitemap generates the url with UpperCase,
and Gatsby generates path with lowercase.
As a result, search engine claims that sitemap's url is not valid.
They say "There is no canonical tag in the URL of the Sitemap"
as they indexes the actual (lowercase) URL and
thinks that the URL of the site map is not canonical.
e.g.
Filename:
2018-04-09-AboutJamStack.md
Sitemap URL:
https://www.some.org/2018-04-09-AboutJamStack/ (301 redirected to actual url)
Actual URL:
https://www.some.org/2018-04-09-aboutjamstack/