Website is not available in all countries

Hello,
I got a website hosted with the odoo.com platform. it is a erp/ecommerce tool with hosting service.
they offer a ssl certificate for the www.domain.tld form. It works fine.

but since it doesnt do SSL for the naked domain I signed to Cloudflare to set up a redirection for the naked domain to the www.domain.tld. To do so I added a A record to the IP of the odoo database

Flushing the DNS and browsers Cache and got the website showing up correctly and doing the all the redirections on my end.

but, I started receiving messages that people in other countries are not accessing the site properly when typing the naked domain.

www.soundfreak.io
soundfreak.io

Thanks in advance

Check your SSL/TLS is set to “Full (strict)” here…
https://dash.cloudflare.com/?to=/:account/:zone/ssl-tls

I’m getting different behaviour between testing externally and from a Cloudflare worker which may indicate “Flexible” is in use which could be why I’m seeing different redirects…
https://cf.sjr.org.uk/tools/check?ce88bce3fb454404904f39cca773ec0f#connection-server
https://cf.sjr.org.uk/tools/check?2adbeb16aaf54dafa10be1d2830f3d5f#connection-worker

2 Likes

Thanks for the fast reply.
I just changed that setting

You now have a 526 error from Cloudlfare for soundfreak.io, probably because you did this…

https://cf.sjr.org.uk/tools/check?a4a2e5517e6c45438977da98edea6520#connection-server

Did you set up a redirect on Cloudflare from www to the apex?

If not, set up a redirect rule here to redirect the apex to www
https://dash.cloudflare.com/?to=/:account/:zone/rules/redirect-rules

…by copying this example…

1 Like

Hi,

I created a CNAME for the www that points to the odoo database like it sais in their documentation.
And, did the redirect from the naked to the www.domain.tld through the A records

Which of the examples in the page you shared I should replicate to create the rule? This one:

Redirect all requests to a different hostname?

After doing this, I must remove the A records I created earlier to redirect apex to www.?

Regards,
Érico

The www record is ok if that’s what Odoo want as it is working (and working while proxied, which means you can get the analytics and apply Cloudflare features if needed).

When you create the redirect rule, the IP addresses in the A records won’t be used, but there needs to be one so that the apex domain resolves to Cloudflare and the redirect can happen.

You can replace the A records with a proxied value of A 192.0.2.1 or AAAA 100:: as dummy values. This helps to remind you there is a redirect, and also if the redirect breaks for any reason, means the request will just time out rather than be passed to a real IP address.

1 Like

ok. So I created the A 192.0.2.1 but should delete the other A records i created before?

and for the rule creation. Is this correct?

Thank you very much

or the rule should be created like this:

For tidyness, yes. The other A records won’t do anything.

Use the redirect rule for hostname equals soundfreak.io since you only want requests for the apex domain to be redirected, not every request into the zone.

Thank you very much. I just did all those changes.
How do i know it is working properly now?

Try it :slight_smile:

You can see the redirect step now working properly here…
https://cf.sjr.org.uk/tools/check?8b0f39ebd89f444e8d787319c09d9ec0#connection-server
https://cf.sjr.org.uk/tools/check?4f0a6d4f044d41a0b6b6ee31a9b6bddc#connection-server
https://cf.sjr.org.uk/tools/check?24445b09964e45afab7376eaf23b1181#connection-server

1 Like

Thank you very much SJR!!!

It looks like it working everywhere now!

1 Like

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