What is the purpose of the URI record in Cloudflare DNS?

I was looking for a way to direct traffic from a subdomain (from.example.com) to a different target altogether (to.another.com). I thought I’d found the answer with the URI record which says it forwards from a [name] to a [target]. I created a record like this:

URI from 1 "http://to.another.com" 10 DNS Only

But this seems to have no effect.

So what is the purpose of the URI record in Cloudflare DNS? When would it be appropriate to use it?

And is the only way to actually direct traffic from a name to a target via page rules? It seems a shame to spend page rules doing something this simple.


It’s one of the DNS supported records.

Thanks @matteo, I had already read the wikipedia article. I just don’t understand the purpose. What is the point of “mappings from hostnames to URIs” if no action is taken to follow the mapping? Is this purely informational, with no actual impact?

1 Like

Never used one, I guess there was a reason in the creator’s mind. No clue there and not something Cloudflare worries about…

Yeah, I’m reading the RFC about URI Records and must say most of it goes over my head. But the bottom line is that it does not seem to be something that facilitates redirecting a request. So it is not of use for my purpose, anyway! :slight_smile:

To do simple redirects to a specific URL you can simply use a Page Rule, it’s way easier!

Yup, I can see how the page rules would work. Unfortunately I am trying to do this with a free account and only get 3 page rules, but I have about half a dozen subdomain-based redirects on this domain. I’ll have to come up with one whacky regex or another clever plan, because otherwise this domain does not really justify a paid plan.

You could use a Worker then… 10M/reqs for 5$/month.

That is an interesting idea! I had not explored workers at all. Thanks, @matteo.

1 Like

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