Learn how to forward visitor traffic from HTTP to HTTPS for either your entire domain or for a portion of your traffic.
There are two methods of redirecting visitors to a secure HTTPS connection:
- (Recommended) Enable the Always Use HTTPS feature in the Cloudflare Crypto app.
Global setting that redirects all HTTP traffic for your domain to HTTPS.
- Create a Page Rule in the Cloudflare Page Rules app.
Allows specific redirects by hostname or URL.
Refer to our Page Rules tutorial to understand URL matches and to review Page Rule features. Redirects via Page Rules are accomplished for specific URL patterns via the Forwarding URL setting.
The Forwarding URL can redirect to either another subdomain, directory or URL in addition to forcing HTTPS. For example, a URL match of
redirects requests for the example.com root domain to the www.example.com subdomain while preserving the directory path of the URL.