Allowing only TLS connections to your site
If you want to only allow TLS on your site, we have you covered. There is a switch built into the "Request Settings" that will allow you to force unencrypted requests over to TLS. It works by returning a 301 Moved Permanently response to any unencrypted request, which redirects to the TLS equivalent. For instance, making a request for http://www.example.com/foo.jpeg would redirect to https://www.example.com/foo.jpeg.
- Log in to the Fastly application and click the configure button (wrench icon).
- From the Service menu, select the appropriate service and then click the blue Configure button (with the gear icon) to the right of the service name.
- Click the Settings pane and find the Request Settings section.
Click the New button to the right of the Request Settings section. The New Request Settings window appears.
Type a name in the Name field. ('Default' works fine, if it's your only one.)
Select Yes from the Force SSL menu.
Click Create to save your request setting changes.
Once you deploy your changes, you're done!Back to Top