Bug #88838
closedImproved 404 handling for multi-lingual websites
100%
Description
With TYPO3 v9 the site configuration with its own 404 handling comes in. But it has a drawback: When you have a site configuration with multiple languages which results in URLs like /de/, /en/, /fr/ and now a URL which starts with /abc a redirect (307) to the default language is performed.
This is not optimal because of the following reasons:
- Under SEO aspects: it seems to a search engine, that the old URL can be still valid (it's only a temporary redirect) so the URL can still be inside the search results.
- Under UX aspects: The user clicks on a link, comes to the home page and doesn't find what he wants, and leaves (frustrated)
- If you link to that page (from another website) which has this behaviour, you get no information from link validators, that this page has gone (and cannot update or remove the link)
I also had the discussion some time ago, that it is not known, which language the 404 page should be shown. If I want to have this, I should use the default language under the path / and not /de. This is not always possible (we use / to determine the browser language and make a redirect to the according website language).
It is the better alternative to have a 404 page in the default language instead of the redirect.
Updated by Dieter Porth over 5 years ago
You can build a dataprocessor for your 404 site, which will analyze the language of the browser.
You can use javascript to detect the language loading further information via Ajax. (I think, this is the best option.)
https://stackoverflow.com/questions/8199760/how-to-get-the-browser-language-using-javascript
A searchengine-robot does not generate links. If you make a relaunch, you should take care about the old links. That's the task of TYPO3 and its 404-mechanism.
I think the solution of TYPO3 9 is good enough.
Updated by Oliver Hader over 5 years ago
- Tracker changed from Feature to Bug
- TYPO3 Version set to 9
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61346
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61356
Updated by Oliver Hader over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3e5a9c784864d2ffc305c256bc9bcf2e0b3a8633.
Updated by Helmut Hummel about 5 years ago
- Has duplicate Bug #89035: URLs with invalid language path segment are redirected to default language added