Course lesson 48 · Dev Ops & Environments

Custom Domains & Routes

One study unit · Read, recall, then practice · Original video 00:15:29

The application receives its own domain, first through whole-host custom domains and then through path-based Worker routes. Separate production and stage hosts are configured, and the frontend’s socket host must be updated to match them. For short links, the final demonstrated design reserves an /r/ path prefix so requests can reach the data service without swallowing frontend routes.

Primary source: course video 48 · Supplied English subtitles · 00:15:29.

Understand the idea

What the course does

  1. Purchase a demonstration domain in Cloudflare and add an HTTP-to-HTTPS redirect rule.
  2. Configure the user application’s production custom domain and a stage subdomain.
  3. Correct the stage Vite build mode when deployment unexpectedly targets the production domain.
  4. Update frontend host variables in both Cloudflare builds and local environment files so WebSockets reconnect.
  5. Demonstrate separate go and go-stage subdomains for the redirect service.
  6. Replace that approach with /r/* route patterns and update the Hono redirect path to match.

Watch for

Recall before revealing

Why introduce /r/ before every short-link identifier?

Reveal the explanation

It gives the routing configuration an unambiguous pattern for sending short links to the data service while leaving other application paths with the frontend.

Try it

Assign /app, /api/auth, and /r/example to the appropriate service in the final design.

Check your result

You place application and authentication paths with the user-application Worker and /r/example with the redirect data service.

Practice prompts and answer checks are added teaching material. Answer from memory first, then compare and explain any difference.

Rewatch only what you need

Open this lesson in your original course library and seek to the times below. Videos are not hosted on this site.

Companion primary documentation: Wrangler environments. For recorded API names, commands, limits, and prices, check the version you use.

← Previous   Next →