We have a domain registered with Namecheap, but we...
# workers-help
d
We have a domain registered with Namecheap, but we're usind Cloudflare for DNS. The nameservers etc is all setup properly and working, no problems there. Before we moved the DNS to Cloudflare we had a sub-domain that pointet to a invitation link for our Discord server. This invite has recently stopped working and I have to replace it with a new invite link. This is where the problems are starting, because the current sub-domain is a A record pointing to an IP, while on Namecheap, this record was a CNAME pointing directly to the invite link. I have now deleted that from the DNS on Cloudflare. So, how do I create a new sub-domain that points directly to a Discord invite link? (I did try to figure it out online before I came here in search for answers.)
z
This channel is meant for questions about workers, a specific Cloudflare product, for next time this question would fit better in #909458221419356210 or on the community forums at https://community.cloudflare.com. To answer your question: There is no way to set up a DNS record to point to a specific link. Namecheap is doing this by pointing that record at themselves, then redirecting you to the configured link there. You can do that on Cloudflare as well. Add an AAAA record with as value
100::
. Then, go to Rules -> Redirect rules -> Create rule and enter a name for it. Then for field select hostname, and enter the hostname in the field (so eg.
discord.example.com
). Then enter the URL you want it to redirect to in the "Then..." field, leave everything else on default.
d
Oh, I'm really sorry. I didn't know workers was a product, I thought it was the correct place to get help with this. Sorry. I did what you explained, but I keep having the same issue which is that the sub-domain is still pointing to the old invite link, not the new one. As i said in my initial message I deleted the old record, but I deleted the one on Cloudflare, the one that Cloudflare had imported from Namecheap. Do you have any suggestions as to what I can do to resolve that issue?
z
Are there any other records set up on that subdomain? Also, does Cloudflare control the DNS of that domain?
d
There is/was the original one, at Namecheap. But we've changed the Nameservers so I do not have access to edit the DNS settings over at Namecheap anymore. As said, that one got imported (along side all the other sub-domains), and then deleted at Cloudflare. Right now the only record on that specific sub-domain (discord.ourdomain.net) is the one I setup following your instructions above.
c
When I visit , I get redirected to a valid discord invite:
You don't get redirected to that? It could be local cache, might want to try clearing it or opening it in incognito.
d
Could you see which invite link you're directed to? So I know if it's the old or new one
I just checked with another browser. It sends me to the new invite link. My regular browser sends me to the old one, so I'll try deleting the it's cache
c
second screenshot, it's the same as you specified in the redirect rule, PuC...
d
Ah sorry, I only looked at the first pic
My bad
Deleting the cache did the trick, thanks again for the help
c
no worries, happy you figured it out. Redirect rules are really flexible but also simple to work with, will make it easy to update in the future
3 Views