Cookies ahead

Our support chat tool "Intercom" would like to collect some more data on you. See the related link for more details.

Docs

Hosts file

Reviewedbyfl

Markdown ↓

🌐

Test domains before DNS changes.

Test a custom domain locally before switching DNS routing by adding an entry to your hosts file.

To test a custom domain before actually routing DNS to fortrabbit, add the domain to your fortrabbit app, then modify your local hosts file to tell your local machine that the domain is served from your app on fortrabbit.

hosts file location

The hosts file is a text file (without file type ending). It can be found here:

  • MacOS & Linux: /etc/hosts
  • Windows: c:\windows\system32\drivers\etc\hosts

Editing your local hosts file

Your local file contains many entries: do not edit those. Just add a new line with the IP of your App and the domain you want to see routed there like so:

# pattern (how it works)
[your App's IP address] [your fully qualified domain name]

# example (what it looks like)
12.0.0.1 mydomain.com www.mydomain.com
shell

Undo changes to your hosts file

After your domain has been moved/propagated be sure to remove the entry from your hosts file.

Written by a human. Review, grammar checks and typo fixes by AI.

AI use & editorial processEdit on GitHub ↗