1

Should pinging a domain give you the IP the same as the A Record? Are there conditions where it shouldn't? A client's website isn't pointing to the A record IP, it's point to a Cloudflare DNS server. I can't redirect to HTTPS, I get a too many redirects error, I cant go to the CPanel, it's not reading the CSS and giving me a broken page. My client's IT support company isn't very helpful, Any ideas?

  • No a domain at apex does not necessarily have an A record, it can have none, or it can also have AAAA records for IPv6. – Patrick Mevzek Oct 29 '18 at 15:11
1

When a user visits a Cloudflare website they are essentially receiving data from Cloudflare, not your server, therefore doing a ping should return a Cloudflare IP, not the cPanels, in fact, it's actually a good thing that it hides your IP address since it protects your server from attacks. Cloudflare is basically a firewall that sits between your server and your visitors.

It's common for Cloudflare to cause CSS errors in cPanel, the best solution to this problem is 'not' to use your-domain.com/cpanel and use the preferred method of accessing it using your host's domain associated with that particular server.

Your cPanel based web host will be able to provide you with their own domain that is attached to their WHM/cPanel account, its the best method since it uses their SSL and never has issues such as your having now.

Alternatively, you can 'click the orange cloud' and disable Cloudflare Temporarily while you do the changes you need but personally, I always recommend using their domain to access your cPanel.

  • Thanks for your answer Simon, that explains it. Cloudflare aren't hosting the site, just email. I really want to use the SSL certificate that's on the Apache server I'm using for the site as it verifies identity. It is working ok, the main problem is the standard (Apache specified) re-direct to non www, HTTPS doesn't work. It gives a too many re-directs error in the browser and doesn't display the website. I don't have this problem with other sites where pinging returns the A Record IP. Do you know if Cloudflare has a htacess script that can be used to redirect to HTTPS and non www? – JoeR57 Oct 29 '18 at 0:48
  • @JoeR57 htaccess is a config file for Apache servers, so Cloudflare doesn't support it. To do redirects on Cloudflare you can use page rules. – Maximillian Laumeister Oct 29 '18 at 1:09
  • @MaximillianLaumeister that's not true. You can use redirects on both hosting and Cloudflare, it only becomes a problem when you have the same rules. – Simon Hayter Oct 29 '18 at 16:32
  • @JoeR57 to redirect using Cloudflare from non-ssl to ssl simply check always HTTPS in Cloudflare, or page rules it using http://www.example.com/* to https://www.example.com/$1 – Simon Hayter Oct 29 '18 at 16:33
  • Also @JoeR57 your comments are not exactly what you asked in the question. – Simon Hayter Oct 29 '18 at 16:38
1

Should pinging a domain give you the IP the same as the A Record?

Yes, as long as the DNS has had enough time to fully update.

A client's website isn't pointing to the A record IP, it's point to a Cloudflare DNS server.

Cloudflare's A records are not really true A records if you have their CDN service switched on. To switch off their CDN service, click the orange cloud next to the A record so that it becomes a gray cloud. This will turn off the CDN service (and all CDN-related services) for the A record. This will make your A record actually point directly to the IP address that you set it to, like a normal A record, rather than having Cloudflare's server as a go-between.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.