Introduction
In this documentation, we will guide you through the process of setting up a custom domain for your Fleek site. With a custom domain, you can create a unique web address for your site that reflects your brand or organization.
To get started, you'll need a custom domain. Once you have that, you can follow our step-by-step guide to configure your domain and connect it to your Fleek site.
We'll cover the following topics:
- Adding a domain to Fleek
- Listing your current domains
- Manually Verifying your domain
By the end of this documentation, you'll have a fully functioning custom domain that points to your Fleek site. Let's get started!
How it works
In order to offer the custom domains feature, we are creating a pull zone on a Content Delivery Network (CDN), which allows us to store cached versions of your website content in various locations around the world. This means that users who visit your website from different parts of the world will be able to access it more quickly and efficiently. In the future we aim to deliver this feature via Fleek Network (opens in a new tab).
To set this up, we will create a unique URL for your pull zone, which will point to the last deployed content on your site. You will then need to configure your domain to the pull zone URL using a CNAME record or an ANAME, depending on your DNS provider. This ensures that when someone visits your custom domain, they will be directed to the cached content on our CDN, resulting in faster load times.
In case you want to setp up a root domain you need to user a DNS provier that supports ANAME record or CNAME as a root record. Some of the most popular DNS providers that support this:
- Cloudflare
- DNS Made Easy
- DNSimple
- CONSTELLIX
- DYN DNS
- Easy DNS
- NS1
If your DNS provider does not support ANAME record and you want to use your root domain with your Fleek site, please consider migratring to one of the providers above.
Each time you make a new deployment on your site, we will automatically update the pull zone with the latest content. This means that your visitors will always see the most up-to-date version of your website, without any additional effort on your part.
Add a custom domain
The first step is to add a domain. To do this, you will need a project and a site to configure it on. Once you have these, you can choose from the different interfaces available to set up the domain.
To add your domain using the command-line interface (CLI), use the domains create
method. This will trigger a wizard to add, set up, and verify your domain.
The first step is to select the site you want to add the domain to. You can choose from the list of sites you have access to.
> fleek domains create
WARN! Fleek CLI is in beta, use it at your own discretion
✔ Choose site to add domain to › fleek-demos-blog-2
Once you have selected the site, you will be prompted to enter the domain you want to add.
> fleek domains create
WARN! Fleek CLI is in beta, use it at your own discretion
✔ Choose site to add domain to › fleek-demos-blog-2
✔ Enter domain name (eg. example.com) … fleekdemos.online
> Success! Domain "fleekdemos.online" successfully added.
Now that the domain is created you will need to set up the correct DNS records to make sure that your domain points to the CDN pull zone. The CLI will provide you with the DNS records you need to add to your domain.
> fleek domains create
WARN! Fleek CLI is in beta, use it at your own discretion
✔ Choose site to add domain to › fleek-demos-blog-2
✔ Enter domain name (eg. example.com) … fleekdemos.online
> Success! Domain "fleekdemos.online" successfully added.
> Update DNS records for "fleekdemos.online":
> CNAME @ <your pullzone>
> Press any key as soon as you configure your domain provider for verification.
If you need help configuring your DNS records, you can find more information in our DNS records guide.
Once you have confured your DNS records, you can verify your domain. To do this, you will need to press any key in the CLI. This will trigger a verification process that will check if the DNS records are correctly configured.
> fleek domains create
WARN! Fleek CLI is in beta, use it at your own discretion
✔ Choose site to add domain to › fleek-demos-blog-2
✔ Enter domain name (eg. example.com) … fleekdemos.online
> Success! Domain "fleekdemos.online" successfully added.
> Update DNS records for "fleekdemos.online":
> CNAME @ <your pullzone>
> Press any key as soon as you configure your domain provider for verification.
> Success! Domain "fleekdemos.online" was verified.
That is it! Once the DNS propagation is complete, your domain will be ready to use.
List domains
At any moment you can list the domains you have added to your site.
To do this, you can use the domains list
method. This will list all the domains you have added to your site and the status of each.
> fleek domains list
WARN! Fleek CLI is in beta, use it at your own discretion
Hostname Created At Verified
------------------------------------------------------
fleekdemos.online 2023-03-01T09:43:09.698Z ✔
Domain details
You can check the detils for the configuration of your domain at any moment, this can help if you are changing DSN provider for example.
To do this, you can use the domains details
method where you need to pass the domain name as a parameter. We use the domain name as an identifier for the domain to avoid using internal IDs.
> fleek domains detail fleekdemos.online
WARN! Fleek CLI is in beta, use it at your own discretion
Hostname CreatedAt Verified
-----------------------------------------------------
fleekdemos.online 2023-03-01T09:43:09.698Z ✔
> Configure your domain provider according to following table:
Type Name Value
----------------------------------------------------
CNAME hostname <your pullzone>
Manual verification
If during the setup process you couldn't verify your domain, you can do it manually.
To do this, you can use the domains verify
method. This will list the domains available for verification and you can select the one you want to verify.
> fleek domains verify fleekdemos.online
WARN! Fleek CLI is in beta, use it at your own discretion
✔ Choose a domain you want to verify › fleekdemos.online
> Success! Domain "fleekdemos.online" was verified.
Delete a domain
IMPORTANT! Deleting a domain will remove the domain from your site and it will no longer be available. If you want to use the domain again, you will need to add it again.
To do this, you can use the domains delete
method. This will prompt the wizzerd for domains deletion.
> fleek domains delete
WARN! Fleek CLI is in beta, use it at your own discretion
✔ Enter domain name (eg. example.com) … fleekdemo.online
> Success! Domain "fleekdemo.online " successfully removed.