How to add domain forwarding (URL) records

Hi, I would like to create subdomains that forward to a different URL. My domain provider provided this but since moving to NetlifyDNS I am not sure how to go about it.

I want to create a domain like v1.blog.com and redirect it to some place like website.com/where-things-used-to-be/.

Because I am forwarding to a specified path, I don’t think a CNAME record will solve the problem for me. So far, the only option I can think of is to create more NETLIFY records with apps to enable redirecting their index to where I want.

Is there a better way to go about this?

I had read this post about forwarding subdomains to path but the solution there doesn’t work in my case where I simply want a record that points to a path on a different domain

Hi @josephrexme

The post you linked to it the only option. You would need to add the subdomain to a site (main site or another Netlify site) as a custom domain/custom domain alias a configure redirects. If required, you can have more than one subdomain set up on a single Netlify site.

I know of no other way to accomplish your desired setup.

The link with the solutuion is deleted.

My Domain is paid and registered on netlify and need to create a subdomain like discord.maineomain.com and redirect it to Discord.gg/ahshdb.

How it works? I don’t have the option for create url redirects like 301 only CName etc

Hey @VidarDev

You create a new Netlify site, and add discord.maineomain.com as a custom domain. You can then deploy (using drag and drop) a directory with a _redirects file that contains

/*    https://discord.gg/ahshdb

So that any path on that subdomain is redirected to the Discord URL.

Ok but I want to keep my main site under maineomain.com/ and also don’t want to set up another branch only for this rederict. How do I handle this exactly?

Sry for thebquestion but iam new on netlify. On namecheap tat all was very easy

so i can create a completely new page with discord.maindomain.com. even though i already have a page with maindomain.com?

Correct @VidarDev, you deploy a completely new site and configure discord.maindomain.com as the custom domain. You do not change anything to do with maindomain.com or the site it is attached to.

There is no need for a branch. You can deploy this site using Drag and Drop.

Wow ok nice. i will try it right away. thank you very much for the help

1 Like

ok why a directory that have only one _redirects file need more then 20 mins to deploy? no fails no deploy only:
Deploy log
3:30:03 PM: Creating deploy upload records

You are using drag and drop? If so it will never deploy as per this guide so you will need to deploy again.

yeah nvm i need a empty index.html

ok all done no fails:
3:49:28 PM: Creating deploy upload records
3:49:30 PM: Starting post processing
3:49:30 PM: Post processing - HTML
3:49:30 PM: Post processing - header rules
3:49:30 PM: Post processing - redirect rules
3:49:30 PM: Post processing done
3:49:33 PM: Site is live :sparkles:

But no forwarding test ureself:

ok handle it the redirect need force for working like that
/* Discord 301!

all done thanks for help

This is not working for me. I tried using a _redirects file a _redirects.txt file and I even tried adding a .netlify.toml file and adding the redirect in there the way I normally would but when I view the site all it does is show a white page and never redirects anywhere.

What am I doing wrong?

Hi @raidchamps welcome back to the forums! Thanks so much for reaching out. Can you share your site name?
I strongly suggest you give it a thorough read through and see if this fixes your problem: