Linking subdomains to netlify pages

I have netlify pages
netlify1.netlify.app
netlify2.netlify.app

I want mydomain.com to display the contents of netlify1.netlify.app (NS needed? no A or CNAME?) and
subdomain.mydomain.com to display netlify2.netlify.app (A, AAAA, ALIAS or CNAME?)

I have never done this before.
Could you please specify what I have to enter where?
Domain provider or netlify?
A, AAAA, ALIAS, CNAME, NS, …?

Type NETLIFY(v6) is the automatic entry. Does this correspond to NS?

Would it be better to merge my netlify pages to branches on one site netlifyall.netlify.app. Then, the subdomains would work automatically, right?

Thanks in advance for your help!

Hey @net-user

Have you checked out this guide yet?

You might also like to check out the following guide to determine if you should use Netlify DNS or not

You can find the relevant documentation for Netlify DNS here and using external DNS here.

All this and more is also available in


The required records will depend on whether you use Netlify DNS or external DNS (see above.)

There are two options you have toyed with

1:

and 2:

This is (probably) largely personal preference. Some people prefer a blog at /blog others at blog.example.com. Either way both are possible, though using a sub-domain is easier to configure.

If you have any further questions or issues, don’t hesitate to reply.

1 Like

EDIT:
works - thank you for your help!

very easy:

just select “Deploy all branches pushed to the repository” and then add in “branch subdomains”

You need to wait for an hour, because the default DNS records are TTL 3600s.

But I could delete the custom records (NETLIFY, NETLIFYv6) and insert my own.
What would be the correct settings?
A and AAAA? Where do I find the correct IP addresses?
NS for domain.com and branch.domain.com also possible?

EDIT:
Isn’t that a bit strange when you have branches with separate content (no pull requests, merging, …)?

The NETLIFY and NETLIFYv6 records are special. Do not delete them. If you are using Netlify DNS, there is not need to add records for the domain/subdomain when pointing to a Netlify site. If you wish to have a sub-domain pointed elsewhere, then you can add the appropriate records.

Following on from above, you don’t. That is what the NETLIFY records handle. There are multiple CDN nodes around the world so traffic is routed through the closest node.

Yes, you can have branch subdomains.

I’m not sure what you mean here.

Thanks again, coelmay!

Well, usually, braches are used if several people develop and work on the same code. Or major changes to be published later. Then, you merge to the main branch (pull request).

Using branches for different content is a bit special (do not merge!) - but it works :slight_smile:

1 Like