Learn
Connecting Custom Domains to Edge

Connecting Your Domain to Wasmer Edge

Introduction

For production workloads, you most likely want to use your own custom domain, instead of the *.wasmer.app domains.

This guide will explain how to connect your custom domains to your apps hosted on Wasmer Edge.

Subdomain

If you want to connect a subdomain(e.g. blogs.wasmer.io) to your app hosted on Wasmer Edge, you will need to create a CNAME record pointing to your app on wasmer edge.

blogs.wasmer.io. 0 3600 IN CNAME wasmer-blogs.wasmer.app.

And it should be done! You can now access your app on blogs.wasmer.io.

Root domain

Connecting a root domain is a bit more complicated than connecting a subdomain, because you can't create a CNAME record for a root domain. Some large DNS providers emulate root CNAME records. If your provider doesn't allow you to do that, you can use a service like Cloudflare (opens in a new tab). Note: this requires moving your entire DNS setup to Clouflare.

⚠️

If your domain is not controlled by Cloudflare you can transfer it by following the guide

here

ℹ️

Cloudflare does this by CNAME flattening. You can read more about it

here

If you want to connect your root domain (e.g. wasmer.io), to your app hosted on Wasmer Edge You will need to create two additional records:

  1. A CNAME record pointing to your app on wasmer edge.
  2. A TXT record with the value `cname: wasmer.sh. cname:wasmer--wasmer-sh.wasmer.app."
wasmer.io.              0       IN      CNAME   wasmer-website.wasmer.app
wasmer.io.              0       IN      TXT     "cname:wasmer-website.wasmer.app"

And it should work now. You can now access your app on wasmer.io.

Let's breakdown the configuration:

  1. The first record is a CNAME record pointing to your app on wasmer edge.
  2. The second record is a TXT record, which Wasmer Edge uses to verify that you own the domain and how to map it to your app.

This additional record is required because CNAME flattening will not allow Edge to see the original CNAME.

Looking Forward

We are working on making this process easier in the future. Follow the Edge feature announcements for updates!