Redirecting root domain to TLS

Comments

1 comment

  • Taylor

    hi @wheresrhys,

    You can set this up using a synthetic http redirect in your service configuration. I'll include the documentation that provides the finer details, but the idea is as follows.

    1. Create a synthetic 301 Response
    2. Attach a condition that applies if the host header matches "ft.com"
    3. Create a new Response Header with the following details
    4. Set the Destination to http.Location, and the Source to "https://www.ft.com" + req.url
    5. Lastly, attach a response condition that executes the above in the event that the host header matches "ft.com" and the response status is a 301.

    This will ensure that all requests to either http://ft.com or https://ft.com get redirected to https://www.ft.com

    Feel free to shoot us an email at support@fastly.com if you run into any troubles during implementation.

    Cheers

    0
    Comment actions Permalink

Please sign in to leave a comment.