Is it possible to have a special redirect?

I want to know if it is possible to use page rules for a redirect like 192-168-68-118.domain.com to 192.168.68.117 thanks!!

I believe you can redirect to an IP just as you can to a URL.

But can it be done automatically @domjh like 192-168-68-117.domain.com to 192.168.68.117 and 192-168-68-114.domain.com to 192.168.68.114

@domjh how would i set up a page rule for this

Oh right, I see.

It should be possible with a wildcard DNS record and something like *-*-*-*.example.comhttp://$1.$2.$3.$4

bear in mind that this will affect all matching subdomains.

@domjh I kind of figured that, but doesn’t a page rule REQUIRE an according subdomain DNS record

You can use a wildcard

What would I point it to? *.fovdns.fovpowered.com → ???

For example I would want 192-168-68-117.fovdns.fovpowered.com going to 192.168.68.117

If there is no origin, just 192.0.2.1 as in the doc.

1 Like

I will try that then.

Still shows DNS_PROBE_FINISHED_NXDOMAIN

Just a heads-up that a redirect is not a DNS response.

A redirect will point to a Cloudflare IP, which will send a 302 (or 301, or 307, or 308) response redirecting you to the new page.

If you’re looking to create a service like https://nip.io, a Page Rule won’t work.

2 Likes

Is a redirect actually what you want here? This will redirect users to that IP, not make the hostname resolve to that IP.

This is probably a caching issue on your end if you have added the wildcard record correctly.

1 Like

How would I do it, because generally thats exactly what I need to create

You can’t with Cloudflare at the moment.

Alternatives include:

  • running your own DNS server and setting up some custom scripting stuff
  • using Bunny’s Scriptable DNS
2 Likes

The aforementioned nip.io service links to projects on GitHub that would let one run a clone or variation of their platform.

2 Likes

Sorry I’m late, could I make Cloudflare nip.io, but instead of being an A record system, I want it to display the contents of ip.domain.com. If possible, how?