Performance: Custom domains
Custom domains affect the initial page load speed by adding DNS lookup and SSL handshake time before content is delivered.
Use DNS prefetching, enable HTTP/2 or HTTP/3 with TLS session resumption, and cache DNS results.
Configure custom domain without DNS prefetch or caching, and use HTTP without TLS optimization.
| Pattern | DNS Lookup | TLS Handshake | Connection Setup | Verdict |
|---|---|---|---|---|
| No DNS prefetch, no TLS optimization | 100-300ms | 200-400ms | Slow initial connection | [X] Bad |
| DNS prefetch, HTTP/2 with TLS session resumption | Cached or 0ms | 50-100ms | Fast initial connection | [OK] Good |
serve function?serve function accepts an option called hostname to set the domain name.hostname is the correct key; others like domain, host, or url are invalid here.import { serve } from "https://deno.land/std/http/server.ts";
serve(() => new Response("Hello"), { hostname: "example.com" });hostname: "example.com" in the serve options.hostname: "mydomain.com" in your Deno server but users cannot reach your site. What is the most likely cause?serve supports hostname option, so options B, C, and D are incorrect.Pass the test and this pattern moves unknown