/etc/hostsに設定したドメインにアクセスしたところ、ChromeのDNS Lookupで10秒も掛かっていました。
![Chrome-DNS-lookup](https://hanlabo.co.jp/wp-content/uploads/2022/03/Chrome-DNS-lookup-1024x413.png)
色々なアプリケーションを作成したため、hostsにホストが以下のように膨れていました。
どうやら原因はこのhostsファイルのせいのようです。
127.0.0.1 localhost
127.0.0.1 hoge1.example.com
127.0.0.1 hoge2.example.com
127.0.0.1 hoge3.example.com
127.0.0.1 hoge4.example.com
127.0.0.1 hoge5.example.com
以下のように1行で記載するように修正したところ、劇的に読み込みが速くなりました。
127.0.0.1 localhost hoge1.example.com hoge2.example.com hoge3.example.com hoge4.example.com hoge5.example.com
参考サイト
![](https://cdn.sstatic.net/Sites/superuser/Img/apple-touch-icon.png?v=0ad5b7a83e49)
Chrome Slow to Resolve /etc/hosts on macOS / OS X
Our developers use either Docker or VirtualBox (with Vagrant) to test their code locally (and the problem happens with b...