Domain redirects
Redirect alternate domains to a canonical hostname.
Domain redirects send requests from one configured hostname to another.
A common setup is:
or:
Choose one canonical hostname and redirect the other.
Configure a domain redirect
- Add both the source and destination domains to the project
- Wait until both have valid DNS and TLS
- Open the source domain's settings
- Set the domain to redirect and choose a destination hostname
- Choose a redirect status code
- Save the change
- Test the redirect over HTTP and HTTPS
When you add an apex domain, the dashboard can create www as the content host and redirect the apex to www with a 307 by default. You can change the code later.
Easel provisions TLS for the source domain as well as the destination so HTTPS requests can redirect securely.
Redirect status codes
Easel supports:
| Code | Label in the dashboard |
|---|---|
| 301 | Permanent Redirect |
| 302 | Temporary Redirect |
| 307 | Temporary Redirect (Preserve Method) |
| 308 | Permanent Redirect (Preserve Method) |
Use 308 when the canonical hostname is intended to remain stable and you need to preserve the request method and body. Use 307 for temporary changes that must preserve method. 301 and 302 are also available.
Preserve path and query
Domain redirects preserve both path and query string:
becomes:
Domain redirect versus application redirect
Use a domain redirect when every path on one hostname should move to another hostname.
Use framework or route configuration when redirect logic depends on path, query parameters, authentication, locale, headers, or application data.
Domain redirects execute in edge attribution before WAF rules, cache lookups for application content, and function invocation.
Redirect loops
Easel does not currently block saving reciprocal redirects such as:
Avoid configuring loops. Troubleshoot indirect loops by checking:
- Easel domain redirects
- Framework redirects
- Middleware
- Reverse proxies
- CDN rules
- Browser-cached permanent redirects
SEO considerations
Use one canonical hostname consistently in application links, sitemap URLs, canonical tags, OAuth callback URLs, webhook URLs, and cookie configuration.
A redirect consolidates traffic, but application-generated URLs should still use the canonical hostname.