URL Redirect to www & https in one step

How Can redirect my domain to www & https in one step, that’s mean: http://domain.com to https://www.domain.com directly. not: http://domain.com to https://domain.com to https://www.domain.com Or http://domain.com to http://www.domain.com to https://www.domain.com.

Using Page Rules Or .Hataccess

This has come up before:
https://community.cloudflare.com/search?q=gtmetrix%20redirects

Can you please Give me the right instruction, Because from the morning and I’m trying without success.

You should combine Rule #1 and Rule #2. Match the URL from Rule #2, and the URL forwarder of Rule #1.

The new Rule #2 will match https://example.com/* and forward to https://www.example.com/$1

Now it will be only one redirect. Rule #1 will redirect anything HTTP to the correct HTTPS URL. Rule #2 will redirect an HTTPS without the www over to the www.

It’s done, I don’t know Why did this work so well. Because I used the first configuration. maybe cache

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.