IAnswerable

Run Localhost with Custom Domain in Chrome

22 Jul 2025

🛠️ Goal

Run your local website on localhost but access it via a custom domain (e.g. example.ai) without editing /etc/hosts.

🔧 Steps

1️⃣ Install ModHeader Chrome extension
👉 ModHeader on Chrome Web Store

2️⃣ Create a new profile in ModHeader

3️⃣ Set URL filter to match your localhost IP
Example:

*://127.1.22.33/*

4️⃣ Open http://127.1.22.33 in Chrome Chrome will send requests with Host: example.ai so your backend sees the expected domain.

Benefits:


Quick summary: