How do i redirect to a url using dns setup

I was wondering if its possible to redirect to a url using a dns here is what i mean (mockup not much effort im putting into here lol)

You cannot do such redirections alone by using DNS records.

Instead, you’ll make the DNS record for the apex (naked domain) be like this:

Type: AAAA
Name: @, or example.net
IPv6 address: 100::
Proxy status: :orange: Proxied:.

If you also want the www (sub-)domain to redirect, you’ll do the same there:

Type: AAAA
Name: www, or www.example.net
IPv6 address: 100::
Proxy status: :orange: Proxied:.

You can then set up a Redirect Rules using the following link, which should look like this:

https://dash.cloudflare.com/?to=/:account/:zone/rules/redirect-rules

which would redirect both https://example.net and https://www.example.net to https://example.com.

For your use case, you can simply substitute the parts (e.g. www with subdomain), so that they will fit your likings.

4 Likes

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