Domain redirects
Redirect every request on one hostname to a canonical domain.
A redirect domain sends every request on one hostname to another URL, such as
example.com → www.example.com. Pick one canonical hostname and redirect the
others to it.
When you add an apex domain, Easel already offers to do this for you: it adds
www to serve the site and redirects the apex to it with a 308. See
Add a custom domain.
Configure a redirect
- Open Project settings → Domains.
- Add the source hostname with It should set to Redirect, or select the edit (pencil) button on an existing domain and choose Redirect.
- In Redirect to, enter the full destination URL, such as
https://www.example.com. - Choose a Status code.
- Save, then test over both HTTP and HTTPS.
The source hostname needs DNS like any other domain, and the redirect takes effect once it's Live. Easel issues a certificate for it so HTTPS requests redirect without a warning. If the destination is another domain on Easel, make sure it's live too.
To serve the project again, edit the domain and choose Serve this project.
Status codes
| Dashboard option | Use |
|---|---|
| 308 Permanent | Default. Permanent move; keeps the request method and body |
| 307 Temporary | Temporary move; keeps the request method and body |
| 301 Permanent, may change method | Permanent move; clients may switch POST to GET |
| 302 Temporary, may change method | Temporary move; clients may switch POST to GET |
Path and query
Easel appends the original path and query string to the destination:
Domain or application redirect
Use a domain redirect when every path on a hostname should move. Easel answers it before firewall rules, the cache, or your functions run, so your app never sees the request.
Use your framework or project configuration when the redirect depends on the path, query, headers, locale, or authentication. See Redirects and rewrites.
Avoid loops
Easel doesn't stop you from saving reciprocal redirects such as
example.com → www.example.com and www.example.com → example.com. To trace a
loop, see Troubleshooting.
Use the canonical hostname everywhere
A redirect consolidates traffic, but your app should still generate the canonical hostname in links, sitemaps, canonical tags, OAuth callback URLs, webhook URLs, and cookie settings.