You’ve probably seen the posts:
- “How B2B sales helped me run a marathon”
- “How cold calling made me a better engineer”
This isn’t that - unfortunately.
Redirects, DNS, and Terraform
This one started simple: I wanted to redirect the apex domain (vakintosh.com) to the www subdomain.
+-----------------+ 1. User requests +-------------------+
| User | ---------------------------> | vakintosh.com |
| Browser | old URL +-------------------+
+-----------------+ |
| 2. Server sends 301 Redirect
| and new URL location (www.vakintosh.com)
v
+-----------------+ 3. Browser requests +--------------------+
| User | ---------------------------> | www.vakintosh.com |
| Browser | new URL +-------------------+
+-----------------+ |
| 4. Server responds with new content
|
v
+-----------------+ 5. User views new content +-----------------+
| User | <----------------------------- | New Content |
| Browser | content +-----------------+
+-----------------+
- The user sends a request to
vakintosh.com. - The request is intercepted and responded to with a 301 redirect.
- The user’s browser follows the redirect and lands on
www.vakintosh.com.
I figured I’d just do it manually in the Porkbun DNS console - Bad idea.