Add a subdomain + forward to another domain


#1

Hello community!

Relatively new here. I have a domain hosted on Cloudfare from Godaddy.
Not very tech savvy and tried to review answers in here but could not understand or find precisely what I need.

  1. how do I add a subdomain to my main domain?

  2. How do I then forward that entire subdomain and domain URL to another website entirely?

Godaddy will not allow me to add the subdomain there because the DNS is hosted on Cloudfare.

Thank you in advance!


#3

You add a subdomain on the Cloudflare DNS page where your main domain is configured. Only enter the sub name, and not sub.example.com. Use the same IP address as your main domain, but you don’ t need to add the subdomain at GoDaddy.

Make sure it’s set to :orange:

Now…go to Page Rules here and add a new Page Rule:
match sub.example.com/* and Add Setting for Forwarding URL (code 301) to https://otherdomain.com

Any visitor to your subdomain will immediately redirect to the other domain.


#4

Thank you @sdayman ! Where do I find my IP address? It is not listed on Godaddy.


#5

That won’t matter. The redirect will intercept that. You can make it look just like your example.com entry, or plug in a placeholder IP address like 172.217.11.174 (google.com). Really…it’s a safe DNS entry as long as you have that Page Rule.


#6

Sorry to be clear, I meant where do I find MY IP ADDRESS for my own domain? You mentioned to enter it into the field.

Are you saying that I can enter ANY IP address like your Google example? Or do I need my specific IP address for my website domain?

Thank you again!


#7

Yes…any address. It won’t be used because the Page Rule redirects the request.


#8

Greatly appreciated thank you!


#9

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