I added a subdomain and added a dns record, but it's not working

I created a staging subdomain for my site. I set up an a name for it and it was working. It stopped working. I can access the site by modifying my hosts file with the IP address. The site is working fine - the only problem is the subdomain.

Thanks!

1 Like

Hey
Did you create c-name record or I will try also page rule?

Greetings,

Thank you for asking.

I am sorry to hear you’re experiencing an issue with your domain/website while using Cloudflare.

Can you share what kind of error code you’re getting or a screenshot of the error you’re experiencing? :thinking:

May I ask if the sub-domain is in form like sub.domain.com or www.sub.domain.com? :thinking:

Before moving to Cloudflare, was your Website working over HTTPS connection and your sub-domains too? :thinking:
May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )?

So, you’re using your local hosts file to access your website/sub-domain? :thinking:
You might find an issue, as far as if your sub-domain related DNS hostname is proxied :orange:, then you’d have an Cloudflare anycast IP - or multiple ones - shown on the lookup.
Therefore, your local hosts file would try to go (including your Web browser cache and possibly a cache at the DNS of your local ISP provider) to an “known” IP address instead of going for the new proxied :orange: one.
Despite, even if you figure out the new IP, it’s an anycast network, meaning it could change the in the next few days or so.

My best guess is, you’re using development website and IP access, and not having an proper and valid SSL certificate for your sub-domain, therefore possibly having an issues like described at the article from below:

Otherwise, some other issue might happen. Please provide some more feedback regarding this case in your next reply so we could troubleshoot further and help you find a proper solution.

I only created an a name, not a cname. When I tried it said:

An A, AAAA, or CNAME record with that host already exists. (Code: 81053)

Should I remove the a name?

Hey
Is your A record pointing to server, which need the certification.
Sorry for the late response, timezone difference.

Thanks for trying to figure this out!

The subdomain is staging . theeedencenter . com. (no spaces and without the www)

We have been on Cloudflare since the beginning. The site works well. We just added the subdomain for staging.

The error we get is:

This page isn’t working

staging .theedencenter. com redirected you too many times.

  • [Try clearing your cookies](https:// support .google .com/chrome?p=rl_error&hl=en-US).

ERR_TOO_MANY_REDIRECTS

We are using Flexible SSL from Cloudflare.

I went through all the steps on the SSL/TLS not working tutorial, and it didn’t help.

  1. There is a DNS record
  2. It’s working correctly
  3. It’s not too deep
  4. The proxy status is proxied
  5. Https is not working for the subdomain. Always use Https is on
  6. We do not have a certificate from another server

I’m not sure what to do next.

Thanks!

similar issue which led me to this post.
primary site is hosted on Squarespace
created a Vultr VPS for hosting of other services
running nginx proxy manager on Vultr VPS and created a “test” subdomain which I can access via the Vultr IP but not the FQDN (A record created in Cloudflare).

It would seem as though I’ve missed something (granted I am handicapped by my learning curve)

:point_up: I am afraid this could be the issue of the mentioned such as Mixed Content errors, Redirect Loops you’re getting :confused:

Two possible options:

  1. Configure your virtualhosts file with SSL to make sure it’s served via HTTPS from the origin for your sub-domain
    1.1. You could use Let’s Encrypt / Certbot, etc. for a sub-domain to get your ssl
    1.2. Or you could use Cloudflare Origin CA Certificate
  2. Disable SSL for your sub-domain at Cloudflare by using Page Rules and have insecure setup over HTTP only

Here is a way to re-check if you correctly setup the SSL for your domain with Cloudflare:

Regarding available SSL options at Cloudflare dashboard, check here:

If any other issues appear, follow the needed steps for troubleshooting from article below:

In case you do not have an SSL certificate, you can use Cloudflare SSL, if so, kindly make sure you follow the instructions as follows on the below article to setup an SSL certificate using Cloudflare Origin CA Certificate:

Last but not least, kindly have a look here for more information regarding correct SSL settings at the SSL/TLS tab on Cloudflare dashboard:

2 Likes

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