Serve multiple domain names on one site

i have multi-tenant setup and it is working with one tenant at “” how can i allow customers to get to and is this as simple as adding multiple host_ name in site_config.json


It’s pretty simple!

Just do

bench --site [site-name] setup add-domain [new-domain-name]

Followed by bench setup nginx and then restart nginx.


I’m trying to figure out multi-tenant dns. So my main site is under, I have another domain connected on I can access these two from the different domains as mentioned.

I have several 4 other sites under my frappe, How do I access them ?

Great, works! How can we make this work with Lets Encrypt?

There’s a command to setup Let’s Encrypt for custom domains :

bench setup lets-encrypt --custom-domain

1 Like

Great! Thank you.

The full command is as follows:

sudo bench setup lets-encrypt --custom-domain my-custom-domain.tld my-site-name.tld

Run it from the frappe-bench folder.


Yeah, I didn’t remember the entire command, despite have had written the feature myself :grimacing:

1 Like

Please inform me. Why are we running this command in sudo?

Please give an example of this:

My bench is asking for the site:

command: sudo bench setup lets-encrypt --custom-domain

response: Error: Missing argument "site".

Got it

Just feel unsure about the auto renewal part.

You forgot to put the site name after

1 Like

Thanks. That was it. Didnt know it from the example.

Hi, It is probably too late but let me know if you can help. I have two companies in my setup and I haev two domains and these two domains are served by the single site.

now the problem is, the website content is the same for both the domains. is there a way (erpnext native setup) to modify the content based on the company the domain serves? I want the products/services of company abc to be served on

Set up dns multinancy and create different sites for abc and xyz domains. That way, both companies maintain completely separate data. See here: