Redirect Rules not working
I have set up 2 redirect rules with the same scheme as on my other domain but it isn't working.
Has anyone an idea?
Here a screenshot of one rule - the other one is the same but with another path-ending
21 Replies
Is the DNS Record Proxied? What's the specific error you get, it just doesn't match?
I dont get any error and the which DNS record?
The one for the hostname you want the DNS Redirects to work on
if you wanted them to work on your apex, it'd be the one for the name of your site
The DNS address of easysecurity.app was not found. A problem diagnosis is performed.DNS_PROBE_POSSIBLE that doesnt matter 😅
Do you have any origin you want to use for
easysecurity.app
, or just using it for redirects?the 2nd
Then create
AAAA
@
100::
Proxied
100:: is IPv6 Discard, saying if nothing in CF handles it, don't contact any origin.
You need a Proxied DNS for that hostname created so the traffic flows to CF so that the rule can match and workoh. wow.
Okay, let me check something
See, I have the same setup with my other domain (but I've purchased it somewhere else) and it does in fact work.
but... The only proxied record there is something I might have done in order to make it work with the external domain provider. (Where I purchased the domain)
It can be any proxied record. Just having a proxied record means it's going to flow to CF and potentially match a redirect rule
The reason why CF recommends 100:: is because it's very clear to you in the future that there's no real origin there, and if your rule doesn't match the traffic doesn't go anywhere
aaah!
Then I have another question.
Might it be possible that I just develop my own site and then redirect the user just with a script instead of using CF?
You mean a script on your origin server/a script in the js served by your origin to do the redirect?
yes
Sure but why?
CF Redirects are going to be faster then anything you do. All of Cloudflare's 250+ cities have the redirect sitting there, super fast ttfb. Additionally JS Redirects can cause some issues with non-browser clients, better to use a normal http redirect if you can
ah
okay, makes sense
I got this now. Is that correct?
yea then just waiting for dns cache/propagation
ah, insomnia :dogekek:
well, it took a while when I configured the other domain so I will go for a few hours now.
Thank you ^^
Yea it's because you tried visiting it first when the record wasn't there. Negative DNS Cache is for an hour by default and depending on your DNS Resolver (some ISP Resolvers override ttl), it could be even longer
oh wow 💀
yay, it got it ^^