6

I'm a surge.sh plus customer, with a custom domain, let's say

http://bobswidgets.com

However, Bob has asked me to set up a subdomain for his new bespoke service. He wants custom.bobswidgets.com

But I can't figure out how to do this... and whether it's part of the surge plus package I have, or if I need to set this up separately.

shilovk
  • 11,718
  • 17
  • 75
  • 74
ToyChicken
  • 185
  • 3
  • 12

1 Answers1

5

I understand from the team at surge.sh that there are many ways to do this, but here's how I did it.

I'm assuming you already (as I did) have a site, with a custom domain, setup & running on surge.sh

First, you need to add a CNAME record to your DNS entry. In my case it's custom.bobswidgets.com and it should point to surge's domain na-west1.surge.sh

Now you can deploy the content for your subdomain directly with surge using surge /path/to/project -d http://custom.bobswidgets.com

Or you can include a CNAME file at the root of your content director, with the contents (It doesn't have an extension or anything)

custom.bobswidgets.com

Then use surge /path/to/project from your terminal

Essentially, it's exactly the same as the instructions for a normal custom domain - as https://surge.sh/help/adding-a-custom-domain - but using the details for your subdomain.

ToyChicken
  • 185
  • 3
  • 12