DDEV Site Domain Mapping
February 25, 2025 ยท AI Conversations
Map at local
1. **Use a local alias** (so that accessing `https://autohauslange.carmar.digital/` loads your DDEV site)?
2. **Prepare for deployment** (moving the site from DDEV to `https://autohauslange.carmar.digital/`)?
Let me know your goal, and I'll guide you accordingly! ๐
—
### **1. Edit Your Hosts File**
Since `carmar.digital` is a real domain, you need to override DNS resolution locally.
#### **On Windows (Run as Administrator)**
1. Open Notepad as Administrator.
2. Open the file:
C:WindowsSystem32driversetchosts
3. Add this line at the end:
127.0.0.1 autohauslange.carmar.digital
#### **On macOS/Linux**
1. Open Terminal and run:
sudo nano /etc/hosts
2. Add this line:
127.0.0.1 autohauslange.carmar.digital
3. Save and exit (`CTRL + X`, then `Y`, then `Enter`).
—
### **2. Tell DDEV to Recognize the New Domain**
1. Open a terminal in your DDEV project folder.
2. Run:
ddev hostname autohauslange.carmar.digital
3. Restart DDEV:
ddev restart
—
### **3. Test It**
– Open **https://autohauslange.carmar.digital/** in your browser.
– If it doesn't work, try:
– Clearing your **DNS cache**:
ipconfig /flushdns # Windows
sudo dscacheutil -flushcache # macOS
– Restarting your browser or using **Incognito Mode**.
—
Now, `https://autohauslange.carmar.digital/` should point to your local DDEV site! ๐ฏ Let me know if you run into any issues. ๐