Setting up a discord DNS record

Hey there, I’m trying to setup a DNS record for my website to point to a discord invite link. I tried doing A record but you need the ipv4 address for that and I dont have it. I tried the CNAME record and did name “discord” and target “{discordinvlink}” so the top says “discord.{my domain} is an alias of {discordlink} and has its traffic proxied through Cloudflare.”. Unfortunately i got this error “DNS Validation Error (Code: 1004) Content for CNAME record is invalid.” What can I do here?

You can not point a A-Record DNS entry on DNS Level to a URL, just to other DNS entries (as CNAME) or an IP.

What you probably want to achive is doable with a PageRule (if you have some left), or with workers if you have the knowledge.

You probably want a redirect.

Lets assume your target URL is Then do this:

  1. create a A-Record DNS Entry for your wished domain: discord.domain.tld (replace domain.tld with your domain)
  2. point it to
  3. set up a URL forward PageRule like this:

4.1. discord.domain.tld/* =(302)=>


4.2. discord.domain.tld/ =(302)=> (without the asterix)

4.1. = the WHOLE subdomain discord.domain.tld and ALL paths below it will be redirected to the invitelink
4.2. = just the root of the subdomain discord.domain.tld will be redirected and therefore you can still use the rest for something else.

Have fun

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