Custom domain for specific URL

How is it possible to set a custom domain for a specific url. So currently a site is hosted on jade-marigold-2b48fb under a specific URL say https:// jade-marigold-2b48fb/wall/abc then I’d like to set custom domain as walllove.famewall.io which would be directed to the specific URL in the jade marigold site say https:// jade-marigold-2b48fb/wall/abc

How could this be done for multiple URLs as separate custom domains?

Hi, @Goutham, Welcome to the forums! :wave:t6: We are so glad you are here. To set up a custom domain follow the instructions here.

[Support Guide] How to set up Netlify DNS on a domain alias

Please let me know if this works for you!

Oh so the use case is that I’m looking to setup custom domains for specific wall URLs of my own customers programmatically but the one shown here does for only one right?

The use case is that for eg. Customer A signs up and makes a URL embed.famewall.io/wall/f1 display under a domain example.eg.com while Customer B signs up & makes a URL embed.famewall.io/wall/f2 display under domain wall.abc.com

So how can this be done via our backend to Netlify APIs?

There’s no good way to achieve what you need. For completely arbitrary domain names, I’d recommend creating a new Netlify site, attach the domain, and make a deploy with the following _redirects file in it:

/ https://embed.famewall.io/wall/f1 200!

You can connect example.eg.com domain to that site and so on.

You can also do all of this in a single site, but you’d have to add a new redirect for each and every configuration.

Both these methods have their own limits though. A single site cannot have more than 100 domains (primary + domain alias included) and you cannot have more than 500 sites in an account until you talk with sales. So choose accordingly. You can probably attach 100 domains to 500 sites to get this done, but it will soon be unmanageable this way.

Actually my requirement is that customers will have my product’s page displayed in their domain. So all they have to do is enter the custom domain in a text field and I would have to help them set up their custom domain on the app hosted on Netlify.

So can the above steps be achieved for multiple customers on a single deployed site on Netlify? And what API can be used for this purpose?

How would you handle DNS configuration for your users?

So one of my friend who hosted using Netlify was able to achieve that by providing DNS as abc.example.com for the CNAME record of a customer’s website abc.custom.com hosted on their website using Netlify API.

And seemed like SSL was also automatically provisioned

But I was unable to contact them. Would there be a resolution you could think of?

Yes, that setup is possible and I’d have suggested it. I was just asking if you’ve already thought it through or not, because you mentioned:

If that’s all you expect your users to do, I thought you’re not considering asking them to update the DNS. Looks like you’re.

As far as your setup is concerned, do note that, you cannot add more than 100 domains to a single site. So if you wish to add all the domains to a single site, that won’t work. I’d suggest creating a separate site for each user but you’d be limited to 500 sites in an account.

In any case, you’d need to do something like:

  1. Create a site (with the custom domain)
  2. Create a deploy (and also make sure it gets published successfully)

The API guide is here: Get started with the Netlify API | Netlify Docs

Oh got it Hrishikesh. So customers would have to update the DNS from their end once we add a custom domain as you mentioned.

I think creating a new site everytime might make sense for a while now. If I upgrade to the paid tiers, would it allow unlimited sites?

I went through this doc but was unclear. Could you let me know what are all the APIs I need to use for this purpose?

Hiya @Goutham :wave:t6: , welcome to the forums! I am linking you our pricing page. Our paid tiers have a 500 site limit. If you are interested in more than 500 sites we can connect you with our sales. Let me know how you’d like to proceed.