Create Sub Domain

Have created a Sub domain using A record and wish to point this to my domain. After creating A name records i am getting 404 error. How can i achive the task of pointing this sub domain to my main domain

If you want to add new sub-domain to yourdomain.com, your DNS record should look like this one example below:

  1. Has got yourdomain.com pointed to your hosting provider (server IPv4) and is :orange:
  2. Has got example-sub.yourdomain.com (sub-domain) again pointed to IPv4 and :orange:
  3. Has got another myothersub.yourdomain.com (sub-domain) the same
  4. We are going to create a new sub-domain

Maybe you are wanting to point yourdomain.com to www.yourdomain.com and/or vice-versa?

You can add new CNAME record as a sub-domain.yourdomain.com and point it to yourdomain.com, or add new A record for your sub-domain, point it to your IPv4 and make sure :orange. Then, at Page Rules, you can create redirection for all requests made to yoursubdomain.yourdomain.com to point to yourdomain.com with the rule like:

yoursubdomain.yourdomain.com/* -> Forwarding URL (301) -> https://yourdomain.com

On behalf of the Page Rules, here is an good article:

not working i have added A record for my subdomain.domain.com and also added my A record for domain. it gives me 404 error. The solution you provided does not work

Great! That’s it.

But wait, if you get 404 error, this could indicate the subdomain does not exist or does not have any content at your origin/host.

Do you actually get 404 as a return? (could mean the DNS record for it at Cloudflare is :grey: instad of :orange:)

Does any other 5xxx error appear or?

2 Likes

This topic was automatically closed after 31 days. New replies are no longer allowed.