Magento responds to incorrectly-cased requests with 200 code #2103
Replies: 4 comments
-
Leave it as is. only 200. |
Beta Was this translation helpful? Give feedback.
-
There is some more discussion/opinions here: https://www.quora.com/Does-Google-treat-inconsistent-capitalisation-URLs-as-duplicate-content For new sites using 404 would solve the issue because these broken links would ostensibly be discovered and fixed before ever being indexed. However, for existing sites I understand the concern of making a 200 become a 404. I don't see the issue with using a 301, could you expound on why you think that is a bad idea? Perhaps this could be a configurable where the user could choose what response to give when the request case doesn't match the url key? Options could be 200 (default due to historical reasons), 404 and 301. |
Beta Was this translation helpful? Give feedback.
-
From https://moz.com/blog/301-redirection-rules-for-seo
Magento should store URLs in lowercase by default, but for exiting URLs it should be configurable at least. (What about using rewrites if someone wants 301/404? https://www.askapache.com/htaccess/rewrite-uppercase-lowercase/) |
Beta Was this translation helpful? Give feedback.
-
404 is bad idea, because it will trigger thousands 404 errors in google search console. please dont forget stores are using 3rd party SEO extensions like SEO Ultimate from Mageworx, Mirasvit and any changes could break things related to them |
Beta Was this translation helpful? Give feedback.
-
Because Magento uses case-insensitive collations on it's indexes the routers match url keys that have different cases than the requests. This results in a url "/foo" being accessible with a 200 response at "/foO", "/fOo", "/FOO", etc. According to the HTTP spec this is not necessarily invalid but to the SEO world this is considered a duplicate content problem. Technically I think it would be appropriate for these alternate-cased requests to receive 404 responses which could be accomplished by replacing the indexes on the various url key columns with indexes having case-sensitive collations. Some might advocate though for 301 responses to the correctly-cased urls.
What are your thoughts regarding 200 vs 301 vs 404?
Beta Was this translation helpful? Give feedback.
All reactions