I wonder whether is safe to use lvh.me
instead of localhost
when developing locally, since lvh.me
must be resolved and the IP may change over time.
The goal of using lvh.me
is to be able to handle subdomains, since localhost
does not have top level domain.
http://lvh.me is a free service that resolves itself along with all subdomains to localhost . There's nothing to install or run. In fact, if you tried to visit that site it would fail unless you happened to have a local web app running on port 80. If you run host lvh.me you can see that it maps back to 127.0.
Left ventricular hypertrophy, or LVH, is a term for a heart's left pumping chamber that has thickened and may not be pumping efficiently. Sometimes problems such as aortic stenosis or high blood pressure overwork the heart muscle.
Plan A: lvh.me In the past, I've used lvh.me, a domain that's pointed at localhost. If you have a local server running on port 3000, http://lvh.me:3000 will get your server. It has a wildcard DNS record, so [anything]. lvh.me will point to localhost. Here's some more info about lvh.me.
Unless you are the maintainer of lvh.me, you can not be sure it will not disappear or change its RRs for lvh.me.
You can use localhost.localdomain
instead of localhost
, by adding the following lines in your hosts
file:
127.0.0.1 localhost localhost.localdomain ::1 localhost localhost.localdomain
This is better than using lvh.me because:
Since you said in a comment that you do not want to update the host file, you have no mean to be sure that lvh.me will always work for your developers. Therefore, to answer your question: it is not safe. You may register a domain for yourself, but as I said before, some resolvers will block answers corresponding to private addresses space.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With