Skip to main content
Domains

Domain redirects

Redirect alternate domains to a canonical hostname.

Domain redirects send requests from one configured hostname to another.

A common setup is:

example.com → www.example.com

or:

www.example.com → example.com

Choose one canonical hostname and redirect the other.

Configure a domain redirect

  1. Add both the source and destination domains to the project
  2. Wait until both have valid DNS and TLS
  3. Open the source domain's settings
  4. Set the domain to redirect and choose a destination hostname
  5. Choose a redirect status code
  6. Save the change
  7. 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:

CodeLabel in the dashboard
301Permanent Redirect
302Temporary Redirect
307Temporary Redirect (Preserve Method)
308Permanent 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:

https://example.com/docs/start?ref=email

becomes:

https://www.example.com/docs/start?ref=email

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:

example.com → www.example.com
www.example.com → example.com

Avoid configuring loops. Troubleshoot indirect loops by checking:

  • Easel domain redirects
  • Framework redirects
  • Middleware
  • Reverse proxies
  • CDN rules
  • Browser-cached permanent redirects
curl -I -L --max-redirs 10 https://example.com

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.