大网数据广告活动
网站运营与故障问答

How to handle 404-pages caused by missing translation on multilingual websites

· 52CE 我爱测

I'm currently working on a customers multilingual website that has a language switch in the menu bar. On every blog article you can click that switch. However, some articles don't have a translations. So when you click on the lin…

问题原文

原帖链接 · TheKidsWantDjent · CC BY-SA 4.0

I'm currently working on a customers multilingual website that has a language switch in the menu bar. On every blog article you can click that switch. However, some articles don't have a translations. So when you click on the link (the language button) you arrive at a 404-page claiming that the article doesn't exist.

Or in short: Oftentimes articles without a linked translated article link to a 404-page.

What would be the best practice to handle 404-pages caused by links to non-existing translations?

Edit: These are old articles that will not be translated, so that's not an option.

已采纳解答

原帖链接 · patrick · CC BY-SA 4.0

So if I understand correctly on every page that doesn't have a translation there is a link that goes to a 404 page? Those will all become broken links, because Google will be able to find the Url to the page, but it gives a 404 when it actually arrives.

So you'll have to find a way without there being 404 pages. In a website I made, the language switch will always return back to the home page. This is something you could do, but I also understand if your customer values being able to quickly switch between languages on 1 page. You could make the links that are normally 404, go back to the homepage or a different page. Just make sure to not have any links towards the 404 pages.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-06-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。