How can I add a website that is a subdomain?

Hi!

I can’t add a website located at www.SUB.MAIN.com to Cloudflare, which has its own Wordpress installation. MAIN. com has its own Wordpress installation, too. How can I add the SUB.MAIN. com website?

Thanks!
Mike

You add main.com and then create a DNS record for www.sub pointing to the right host.

Simples :wink:

Obviously, “SUB” and “MAIN” are simply placeholders for the true domain names.

Thanks, Sandro! Where do I do this and what does the code look like?

There is no code. You simply add your main.com domain as you’d add any other domain and once that is set up you define the desired host. Please refer to the support centre and the getting started guide for details.

Sorry, Sandro. I’m not understanding the steps. First, what do you mean by “my desired host”? Both main.com and sub.main.com are already hosted by LFCHosting. Then I’ve already added main .com to Cloudflare. What next?

In that case you open the DNS settings of your main.com account and create a DNS record for www.sub and point it to the IP address in question. Again, please refer to the documentation for details.

Sandro. Thanks again. Still, I’m not understanding where you want me to change the DNS settings: on my hosts admin area or on Cloudflare?

Assuming you added your domain on Cloudflare, that would be in Cloudflare’s control panel.

Which URL do you want to configure?

So, I’m assuming that I go into Cloudflare for MAIN.com and enter an A record, placing SUB under “name” and the IP address for my hosting companies server. AND I DO NOT enter the A record at my hosting company. Correct?

That would be correct, however it would be only reachable under sub and not www.sub, for which you would need an additional record. Also keep in mind www.sub would not be reachable by Cloudflare’s default HTTPS certificate (if HTTPS is important to you).

Also, I just noticed that NONE of 4 websites that I added are working. It says that the IP addresses cannot be found. One website is ChicagoNature.com.

You entered two Cloudflare nameservers for that domain but it seems you havent added it to Cloudflare.

I changed the nameservers at my domain registrar to what was assigned by Cloudflare. That’s not enough?

No, you certainly have to add it to Cloudflare and only then assign the nameservers you were given for that domain. Where were you “assigned” the nameservers you mentioned?

Once more, please check out https://support.cloudflare.com/hc/en-us/categories/200275218 before we continue here.

I think I have things right. It says STATUS: ACTIVE, also.

Can you post a screenshot of that dashboard? It would seem as if Cloudflare does not know that domain.

Here it is:

Fair enough, that would look alright, especially if you say the status is listed as active.

Cloudflare still rejects queries for that domain though. I’d probably open a support ticket at this point.

This is the screen shot from the domain registrar showing the nameserver settings for ChicagoNature. com.