Frequently Asked Questions

Does this extension work with Read the Docs?


Read the Docs should detect the 404.html page generated by the extension automatically, and serve it when a user hits a not found page.

If you are using a Single Version project, you may want to set notfound_urls_prefix to None.

Does this extension work with GitHub pages?


You may want to set notfound_urls_prefix to None, and then add permalink: /404.html in the YAML front matter.

If you are using the github provided domain, make sure to set the notfound_urls_prefix to your repository’s name in between two forward slashes. For example if your repository is named MyRepo, then notfound_urls_prefix = "/MyRepo/".

Does this extension work with Jupyter Book?


You need to enable sphinx-notfound-page in your Jupyter Book _config.yml as a custom extension. It would look like similar to the following:

        - notfound.extension

Why is my local web server not showing a 404.html?

Simple web servers, such as http.server, don’t have a default handler for 404 codes, so it doesn’t know to point to the generated 404.html.

To see an example of adding a custom request handler for 404 codes, see:

The answer I’m looking for is not here


Please, open an issue in our issue tracker, and let us know what’s the problem you are having.