I created a subdomain with A record
and made a page rule to redirect it to my public IP
as my website is hosted locally and I perform a local NAT inside my firewall
The forward worked fine but it shows my public IP to the vistors on http address I don’t need to show it
Itried 301 and 302 as the only available options to redirect but with no use
Could you please help me urgently on that
Alos SSL certificate not applied to this subdomain
I use the free suscribtion but could transfer to Pro if require to solve this issue
A redirect instruct the browser to visit a different URL. So when you redirect to your public IP it will naturally be shown to visitors.
A rewrite alters where the the request is sent (different server/path) without changing the URL. This is most likely what you’re after.
What I am not sure about is why you don’t just create a DNS record pointing to your public IP? There should be no need to perform a rewrite if you use a separate subdomain.
Thanks very much I will try this …just one more small question
The subdomain appear to be not secure the SSL work only with my main domain
do there any way to bind the SSL to subdomain also to appear on browser secure
You will have to get a certificate for the subdomain as well. You can either get a Cloudflare Origin CA certificate or use e.g. Certbot to have Let’s Encrypt issue one for free.
You have to install the certificate on your origin server. This will secure the connection between Cloudflare and your origin server. Cloudflare will automatically generate a certificate for the connection between clients and Cloudflare.
could you please lead me how to get the certificate from cloud flaire and what option I need to tick to let the clients use this certificate
Locally I will check with sys admins how to apply this on the local hosting server