This method for configuring extensionless URLs is only available for Sites hosted through CloudCannon. If you host your Site externally, or use CloudCannon in Headless Mode, these instructions will not work.
Extensionless URLs do not end with a trailing /
character or a file extension. For example, a URL with an extension might look like https://example.com/about/
or https://example.com/about.html
, whereas the extensionless URL would be https://example.com/about
. In this example, all these URLs would serve the same content.
Extensionless URLs are optional. However, some web developers prefer extensionless URLs for several reasons:
- They have a cleaner appearance.
- Visitors must remember fewer characters when typing your URL into their Internet browser.
- You can change the underlying file format of the page without updating the URL, future-proofing your URLs.
On CloudCannon, you can elect to serve the same content on URLs with extensions and extensionless URLs. You can also redirect all URLs with extensions to their extensionless counterparts. This ensures each page only has a single URL rather than serving the same content on two different URLs.
By default, CloudCannon serves all content on both URLs with extensions and extensionless URLs.
To serve files on extensionless URLs:
- Navigate to the Routing page under Site Settings.
- Tick the Serve Extensionless URLs checkbox.
- (Optional.) If you want to redirect all URLs to their extensionless counterparts, tick the Redirect to Extensionless URLs checkbox.
- Click the Update routing details button.