Easy routing configuration to configure redirects, 404 pages, and customize URLs.
When you change your website’s structure, you should redirect the old URLs to the new pages. This ensures external links pointing to the old content and search engines can be redirected.
To set up 301 redirects:
301.txtat the root of your site
You can also redirect to external domains and wildcard matching with
*. Here’s an example file:
Redirects will only occur if the redirect-from page/location no longer exists within the site. If the page/location still exists within your site, this will be served instead of performing a redirect.
You can redirect to, but not from a URL fragment (e.g. #example-heading). The fragment is not passed to the server so, it cannot be processed by the redirect.
CloudCannon serves a 404 page when it can’t find a file on your site. Create your own 404 page to blend in with the rest of your site.
To create a custom 404 page:
404.htmlat the root of your site
Set the permalink of your page to /404.html if you are using Jekyll and non-default permalinks.
Extensionless URLs do not end with a trailing slash or a file extension. They map to the file in the same path with an
xml extension. For example, these URLs would serve the same file:
To serve files on extensionless URLs:
Serve Extensionless URLs is on by default for new sites for compatibility with the latest Jekyll versions.
Enabling Force Extensionless URLs redirects URLs with
xml extensions to extensionless versions. This ensures a single URL rather than serving the same file on two different URLs.
CloudCannon automatically adds the
cc-active class to any
<a> tags that point to the current page. Style the
cc-active class with CSS to highlight it.