How to create subdomain redirect

Hey guys

So I have a domain and I want to create a subdomain to redirect to a specific page on my domain.

for example I want to create shop.domain.com and have it redirect to domain.com/product/soccer-ball

How can I accomplish this?

Welcome to the Cloudflare Community. :logodrop:

You should find some good examples here.

The subdomain hostname will need to be :orange: proxied. If you are only using it for redirection, you can create just a AAAA record using the discard prefix address of 100::.

1 Like

can you elaborate on the AAA record please? what do I set the @ and IPv6 address as?

You use @ to represent your naked domain.

100::

so for the “name” section do I put an “@” or do I put the subdomain that I want for exameple “shop”?

If your domain is example.com and you want to use example.com, then you use @. If you want to use shop.example.com then you would add the name shop.

I’ve tried all of the above and it didn’t work. Now for some reason my whole website doesn’t load anymore after I removed the AAA record

Did you alter the DNS records of your working website? If you did, put them back to what they were before. The only DNS record you needed to do anything with was the creation record for the brand new name, shop, so that you could set it to :orange: proxied. That is needed to get visitors to the Cloudflare proxy and your redirect rule.

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