Ask coding questions

← Back to all posts
How can I add multiple domains to my project (html)?
ZacharieRahman (0)

Hey Guys! I wanted to know how I can add multiple domains for my project, it will be appreciated if you can let me know!

Answered by CosmicBear (45) [earned 5 cycles]
View Answer
CosmicBear (45)

I don't think you can add more than 1 custom domain. However, your repl already comes with 3 domains. What you can do, is make a separate repl with another domain, and make it a proxy to the original website.

CosmicBear (45)

@ZacharieRahman I made an example but i think shared proxies are against the rules on repl talk idk so you can look at my repls and find it.

FlappyTheBat (6)

You can't add more than one custom domain, but if you wanted to add another domain, you could just create a CNAME record for your domain pointing towards the custom one to achieve the same effect (I think?)

Example: (already configured as a custom domain for your replit project) -> CNAME record pointing towards

ZacharieRahman (0)

@FlappyTheBat How Can I Do That? What If I Point Both Of My Domains To The cname Given When Linking A Domain?

FlappyTheBat (6)

@ZacharieRahman That might work - try it. If not, you just need to add a CNAME record to the subdomain you want to add to your project (usually, you can do this in the same way you linked your first domain with your project, but replace the target with your domain you have already linked.

Or just do what @CosmicBear suggested.

ZacharieRahman (0)

@FlappyTheBat Unfortunately, it did not work, neither did adding the same project cname, or changing cname to my custom domain

InvisibleOne (3208)

You can only have two that I know of, and that's if you add a custom domain to your repl. You will still be able to access it with the old URL as well as your custom one