docs(deployment): add localized 404 pages guidance for self-hosting#12117
Open
MasterIfeanyi wants to merge 2 commits into
Open
docs(deployment): add localized 404 pages guidance for self-hosting#12117MasterIfeanyi wants to merge 2 commits into
MasterIfeanyi wants to merge 2 commits into
Conversation
slorber
requested changes
Jun 12, 2026
slorber
left a comment
Collaborator
There was a problem hiding this comment.
Most Docusaurus sites are not localized, and this is not really related to self-hosting but applies for CDNs like Vercel/Netlify as well.
For that reason I think it's preferable to move it to a i18n page instead.
For example: https://docusaurus.io/docs/next/i18n/tutorial
I would append a ## Translate your 404 page heading/section
|
|
||
| To serve the correct localized 404 page, you need to configure your server to redirect missing pages to the appropriate locale-specific 404 file. For example: | ||
|
|
||
| - If a visitor requests `/fr/nonexistent-page`, the server should serve `/fr/404.html` instead of `/404.html`. |
Collaborator
There was a problem hiding this comment.
Suggested change
| - If a visitor requests `/fr/nonexistent-page`, the server should serve `/fr/404.html` instead of `/404.html`. | |
| - `/nonexistent-page` should serve `/404.html` | |
| - `/fr/nonexistent-page` should serve `/fr/404.html` | |
| - `/it/nonexistent-page` should serve `/it/404.html` |
Little suggestion to clarify things and avoid a bulletlist with a single item
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
This adds documentation for serving localized 404 pages, as discussed in issue #10473. Users with multi-language sites often don't realize their server needs special configuration to serve locale-specific 404 pages like /fr/404.html.
Test Plan
Ran the Docusaurus website locally with
pnpm startand verified the new section appears correctly under "Self-Hosting" at http://localhost:3000/docs/deployment#localized-404-pagesTest links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
Closes #10473