Deploy Jekyll to Surge.sh to add a custom domain name: easily build a static website

🚀 Want to add yourDeploy Jekyll static blog to Surge.shAnd bind a custom domain name?

This article details the strategies to make your website fly! 🌟 Don’t miss this opportunity to blow up your blog! 💥

Add custom domain name

With Surge, you can choose to use a custom domain name instead of the Surge.sh subdomain.

  • This means you will be able to publish content to a custom domain www.etufo.org

Set CNAME records

  1. First, you must have a custom domain name and log into your account to manage it.
  2. Add a new CNAME record to your domain name.
  3. Set hostname to@Orwww, and connect tona-west1.surge.sh.

Depending on your domain provider, the steps may look like this ▼

Deploy Jekyll to Surge.sh and add a custom domain name: Easily build a static website

If your DNS service provider does not support CNAME records for top-level domain names, you can point the A record to the following IP address ▼

45.55.110.124

Deploy the project to a custom domain name

Now you are ready to deploy your project to your custom domain name.

After installing the Surge command line tool, you can execute the following command ▼

surge _site/ www.etufo.org

Save custom domain settings

You can save custom domain name settings so you don't have to enter them again each time you deploy.

Just go to the root directory of the project you want to deploy d:\Jekyll\site1\ , add a file namedCNAMEfile (without extension), Surge will automatically use the file.

How to create a CNAME file is as follows ▼

echo www.etufo.org > CNAME

After creating the CNAME file, you need to deploy the website▼

jekyll build
  • in order to allowJekyllnetwork file directory d:\Jekyll\site1\ generateCNAMEfile.
  • Because Jekyll's network file directory is generated based on Jekyll's project root.

Comment

Your email address will not be published. Required fields * Callout

Scroll to Top