• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Difference between locallhost and 127?

JuggaloUser

New Member
Joined
Jan 10, 2013
Messages
62
Reaction score
1
Can anyone tell me why I type in 127.0.0.1 in and get one site, but type in localhost and its the same site, just not the same site.... here look....

127.0.0.1.jpglocalhost.jpg

- - - Updated - - -

Also some things in the config.php aren't showing up on the site, but changes in the styles.css are..... like I changed the name of title window and the little discription under it, also changed stuff for paypal and its not showing up, tried restarting computer too, nothing....
 
When you set up your database it asks you to specify localhost, try change it to 127.0.0.1
There is no difference between the two, besides 127.0.0.1 being a IPv4 address and local host being IPv6.
 
I have switched between those two before I posted obviously, but it seems that typing it in localhost was slow, like it hadn't loaded the css yet, but then after a lil while after restarting my computer and just refreshing, both tabs open showing one with css, and one without, but then refreshed and it showed it just like 127.0.0.1, thats odd right? I was wondering, would people connecting IPv6 be the only ones it wouldn't have showed css to yet? Since 127.0.0.1 showed it and its IPv4.... I was worried what it was showing up from outside perspective, no friends up to check it for me.... :D
 
Sometimes it get stuck, try ctrl+r & then try both addresses... since both 127.0.0.1 & localhost is the same, try another browser also.
 
Localhost = 127.0.0.1 // But only if you hosts.file does exists and isnt change from the start.

since the file hosts.file you can set a name to something and it redirects to it.

More or less your hosts.file is your own computers DNS
 
Right I know how that works, I could make my own number up really and redirect it back... Thats easy and I understand how that works, it is just odd for that to happen is it not?

did anyone look at the attatchments? pay attention to the time and date, and what was typed in the address bar, those two tabs were opened at the same time, and still they were different...
 
Looks like you was playing around with templates a bit and the cache on localhost and 127.0.0.1 is different. Try reloading the site without cache (CTRL + F5 I think).

The difference between 127.0.0.1 and localhost is that 127.0.0.1 is a clean IP (also, a guaranteed IPv4 address).
localhost is a domain name coded on your computer (hosts file) that usually points toward 127.0.0.1.

Sometimes, localhost points toward the "IPv6 alternative" to 127.0.0.1, which can make it messy.

Also, web browser will not recognize that localhost and 127.0.0.1 leads to the same page, thus creating separate cache of those addresses.
 
Last edited:
Back
Top