DNS record for staging subdomain not working

What is the name of the domain?

<fuelpovertyaction.org.uk>

What is the issue you’re encountering

Have added a DNS record in Cloudflare for the new subdomain: Type: A record Name: staging Content: 46.183.9.76 (IP address of the staging site server) Proxy Status: DNS only But if you attempt to reach staging, it resolves at www. I’ve done this before with other DNS providers, pointing a Staging record to this hosting provider, without problems. Live site on the root domain is all working fine for that. There is an A record pointing to the IP of the server. It is Proxied. Not sure if this is SSL related, but we have added a LetsEncrypt SSL on the other host for staging. The Cloudflare account has a Universal SSL certificate.

What steps have you taken to resolve the issue?

Spoken to the technical support at the web hosting. They deleted and recreated the staging site in case of errors at their end. They now suggest changing the A record for the root domain to DNS only to see if that helps, but am nervous of any other impacts that may have. According to the cloudflare docs a DNS-only subdomain should work when pointed to the hosting, regardless of the proxy status of other subdomains.

What feature, service or problem is this related to?

DNS records

Just to add the staging site is at https://staging.fuelpovertyaction.org.uk/

I kept falliung foul of the link limit as it it converts all mentions of ‘A record’ to a link

Your origin server is doing the redirect…

curl -I https://staging.fuelpovertyaction.org.uk/
HTTP/2 302
server: nginx
date: Wed, 19 Feb 2025 16:08:34 GMT
content-type: text/html; charset=UTF-8
location: https://fuelpovertyaction.org.uk/
x-redirect-by: WordPress
link: <https://fuelpovertyaction.org.uk/wp-json/>; rel="https://api.w.org/"
x-fastcgi-cache: BYPASS
2 Likes

Aargh

Thank you so much SJR, hugely appreciated.

I’ll go back to the web hosting support people.

Can I ask what you use to trace the redirect - hopefully next time I’ll be able to figure it out myself.

From the command line curl can be really useful.
curl -I https://staging.fuelpovertyaction.org.uk/ is the specific command @sjr ran here. the -I flag tells curl to return just the headers. In this header there are no Cloudflare headers which easily eliminates it as the cause and the location header indicates where the browser is being redirected to and in this case it appears to be being done based on WordPress based redirects based on the x-redirect-by header.

by default I use -Ikv for this type of troubleshooting. It probably has more infromation that isn’t needed in this instance, but I’ve run it so often I can just key in on the info I need. Here’s that command against google curl -Ikv https://google.com

Some other random examples to show the versatility of the tool. I don’t use 90% of those command ever but… :smiley:

https://www.liquidweb.com/blog/fun-with-curl/

1 Like

Thank you @cscharff ! That’s tucked away now for future use.

The issue is also solved - nothing to do with Cloudflare but an incorrect setting on the hosting.

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