URL path prefixes
URL path prefixes allow you to customize the URL structure of your documentation, giving you more control over how your documentation is organized and presented.
Note
This is a Read the Docs for Business feature available on Pro and higher plans. Contact Read the Docs support to enable custom URL path prefixes for your project.
What are URL path prefixes?
By default, Read the Docs serves documentation from the following URL patterns:
Project type |
Default URL pattern |
|---|---|
Multi-version with translations |
|
Multi-version without translations |
|
Single version without translations |
|
Subproject (multi-version with translations) |
|
Subproject (multi-version without translations) |
|
Subproject (single version without translations) |
|
URL path prefixes let you customize these URL patterns by:
Adding a prefix to your project’s documentation URLs
Changing or removing the
/projects/prefix used for subprojects
Use cases
Here are some common scenarios where custom URL path prefixes are useful:
- Proxy documentation behind your main website
If you want to serve your documentation as part of your main website (for example, at
https://example.com/docs/), you can configure your web server to proxy requests to Read the Docs and use a custom prefix of/docs/to match. Your documentation would then be served fromhttps://example.com/docs/en/latest/instead ofhttps://example.com/en/latest/.- Remove or customize the
/projects/prefix from subproject URLs By default, subprojects are served from URLs like
https://docs.example.com/projects/plugin/en/latest/. You can change this prefix to something shorter or remove it entirely, so your subproject is served fromhttps://docs.example.com/plugin/en/latest/orhttps://docs.example.com/libs/plugin/en/latest/.- Organize documentation with meaningful URL paths
You can use prefixes to create a more meaningful URL structure. For example, you could use
/api/for API documentation and/guides/for user guides.
Getting started
To enable this feature for your project:
Ensure you have a Pro plan or higher subscription.
Contact Read the Docs support with your project name and desired URL structure.
Our support team will configure the custom prefixes for your project.
Tip
When planning your URL structure, consider how it will affect existing links to your documentation. You may need to set up redirects to ensure old URLs continue to work.
See also
- Subprojects
Learn how to set up subprojects and share a custom domain
- Custom domains
Configure a custom domain for your documentation
- URL versioning schemes
Learn about different URL versioning schemes