statichost.eu logo
Documentation

Custom domains

In order to use your own domain for your site, you need to configure your site and add/change the necessary DNS records per the below instructions. If you follow this order for existing sites, you will have no down-time when switching to statichost.eu.

  1. Configure your domains via the domains property in the statichost.yml configuration file.

    domains:
      # Primary domain
      - www.example.org
      # Domains that redirect to the primary
      - example.org
    

    The first domain on the list is the primary domain. All the other domains on the list will redirect to the primary domain. Redirects preserve the original URL path.

  2. Build your site in order to configure our edge network with your custom domains.

  3. Add DNS records for all of your domains to SITENAME.statichost.eu. - these should be CNAME records for all domains except root domain(s) that need to use ALIAS.

    www.example.org.  CNAME  SITENAME.statichost.eu.
    example.org.      ALIAS  SITENAME.statichost.eu.
    

    Note the dot at the end of the domains. The dot is technically required. However, some DNS providers don’t let you add a trailing dot. In this case, you can leave it out, and it should work correctly.

When DNS settings have been updated and we receive the first request using your custom domain, we will create an HTTPS/SSL certificate for your site automatically and on-demand.

Root domains and IPv6

Root domains (e.g. example.org) cannot use CNAME records. If your DNS provider supports ALIAS or ANAME for the root domain, we recommend using that. It handles both IPv4 and IPv6 without further configuration. If ALIAS or ANAME is not available, then you should manually create A and AAAA records (for IPv4 and IPv6 respectively) pointing to our main server.

Recommended:

example.org.  ALIAS  SITENAME.statichost.eu.

Alternative:

example.org.  A     95.217.26.94
example.org.  AAAA  2a01:4f9:c01f:8002::

We support IPv6 across our entire edge network. IPv6 works out of the box with domains that use CNAME, ALIAS or ANAME. This is because the SITENAME.statichost.eu. domain that these records point to has both IPv4 and IPv6 set. The above ensures your root domain supports IPv4 and IPv6 as well, by using both A and AAAA if necessary.