How to fix www not accessible in cloudflare tunnel.

11 Mar, 2023 | Docker, Server, Wordpress | 0 comments

When we created our cloudflare tunnel for we used the settings bellow:

This will point our service in the container shipping port 81 to the domain using cloudflare tunnel, but cloudflare will only serve the website to and not To fix this we have 2 solutions, we can create a new tunnel to redirect the docker container to www. or we can use clouflare to do the job for us, this is far better option because we would not need to run a second container for the second tunnel to

SOO Lets do it.

1st login to your cloudflare dashboard and click on your domain.

next to to DNS/Records and you will find something similar with what is below:

as you can see the only record on this domain is to and it originates on a cloudflare tunnel. What we will do is create a new A record for and point it to a fake ip. see the image bellow:

Of course this will not solve anything we just created a A record that goes to a random ip, but now we can use Rules/Page Rules to make the redirect.

so go to Rules/Page rules and click “create new rule”

In Url we will put* , this will make any request for be redirected to, you will need to select forward URL as setting, and 301 permanent redirect. On the last url we will insert$1.

After this for example if you try to access you will be presented with


Submit a Comment

Your email address will not be published. Required fields are marked *