Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save patelpreet422/102e75bd385c24d02f38ae386f332f5a to your computer and use it in GitHub Desktop.
Save patelpreet422/102e75bd385c24d02f38ae386f332f5a to your computer and use it in GitHub Desktop.
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
127.0.0.1 api.domain1.com

I HAVE NO RESPONSIBILITY FOR ANY DOMAINS LISTED HERE, OR IN THE COMMENTS, AND IF ANY OF THEM CAPTURE ANY DATA TRANSMITTED BY THE HTTP REQUEST. AT ANY TIME, ANY OF THE DOMAINS LISTED IN THIS ARTICLE MAY STOP WORKING (EXCEPT localhost).

It turns out that some kind hearted people already set up wildcard domains for you already. You can use any domain below and/or any subdomain of these and they currently resolve to 127.0.0.1 but could switch at any time to resolve somewhere else. Here's the list of ones I know about. Let me know if there are more!

Of course, you can setup your own local domain.

Need to use SSL?

sources:

IF YOU ARE COMMENTING TO SHARE A NEW DOMAIN, PLEASE ADD A POINT VERIFICATION LINK TO [check it](https://dnschecker.org/#A/your-domain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment