I have to reach the wordpress platform installed by a certain hosting service, so I can build a new website (that will replace the old one), on a certain IP address. I changed my hosts file under their instructions. I put in it the IP address that they had given me and the website domain (separated by a single space). The hosts file hasn't any extension and it's in the right location (System32/drivers/etc - I'm on Windows 8). I cleaned browser and local DNS cache but nothing change: if I put in the browser the url they had given me (www.domain.com/?hostingname) I see the old website, not the wordpress platform. I tried to ping the domain and it returns a different IP address. What can I do? Thanks everyone in advance.
Ok, I solved. It's important to edit the hosts file with Windows Notepad and not with Notepad++
Related
Is it possible to block website from DNS Level. Is it possible to create DNS server in windows server 2012?
I know you can do it pre-DNS pevel. Prior to DNS lookup, windows will check the hosts file for IP to domain mapping. You can set facebook.com to 192.168.1.1 and it will use that ip for facebook rather than looking it up in DNS, and thus blocking it. This would require modifying the host file on every machine you want to sensor though. Its a file in the system32 folder.
I made this entry in my C:\windows\system32\drivers\etc\hosts file:
convert2mp3.net convert2mp3.com
so that my browser always calls convert2mp3.net instead of convert2mp3.com if i accidentially call convert2mp3.com
But it does not work. I also flushed the DNS cache by executing ipconfig /flushdns in the CMD. I also tried to use another browser but still no redirect.
What am I doing wrong?
The /etc/host file is used to force the resolution of a domain to a specified IP Address. Your line is missing the ip Address help for win7
It should be:
127.0.0.1 mywebsite
You cannot change DNS names like that, especially not in an HTTP context.
So the problem is you sometimes type a .com address in your browser where the site you want to go to actually is at the same address - only ending in ".net".
Even if you could change the hosts file to let the .com address point to the .net server's address, the request is likely to return an error, because their server isn't configured to handle requests to the .com address, which your browser will still send as a host header.
So create a bookmark in your browser and click that, instead of typing DNS addresses yourself if you're making that mistake that often.
I'm setting up an iMAC in a store. They want to have the browser open to their website and restrict access so people can't use the computer to browse any other site. I see many discussions online but no actual code sample. Can you please write out the exact lines of code that I need to add to the hosts file and its location on a new iMAC with OS X.
You can achieve this by catching all web traffic and routing it to the IP address of the site you want to limit access to.
For example: If the website IP was 10.0.0.1
10.0.0.1 .com
10.0.0.1 .info
10.0.0.1 .org
(You can keep adding rows for each TLD (.com, .net etc) that you wish to block.
Any http requests sent from the machine would then try to resolve on that host.
This should prevent other websites from resolving but the one you require.
One of my sites - mediadeals.co.uk is showing a blank page.
So I went back to my developer. He asked me to add this on my hosts file
in windows->system32->drivers->etc->hosts
74.86.205.232 mediadeals.co.uk
After doing this the site started working. What does this mean?
Thats crazy. All he did was make it work on YOUR machine. The hosts file simply maps names to IP addresses. Its like a local DNS. What needs to happen for the outside world to see this the DNS servers that are authoritative for mediadeals.co.uk need to have an A record pointing to 74.86.205.232.
How long ago did you register that site name? Don't forget that DNS entries may take a while to propagate across the web. 24 hrs+ sometimes.
And btw, that "fix" will ONLY work on your machine. It maps the friendly URL to an IP address for you, not for the world.
The reason its not working is there is no DNS record for it.
The hosts file is allowing you to point via a local DNS replacement.
All you need is to get the site hosted somewhere and a DNS entry setup.
If you like the site and he is willing to host for $150 then go for it, depending on your contract, if he should have done in the initial budget then you should question this.
RE
I just want to add a couple subdomains to my computers FQDN so that I can have some Vitrual Servers (apache.)
Any ideas?
Note: I need to add the aliases to my machine, like a.foo.com and b.foo.com. I don't think apache makes those aliases.
Alternative: I decided that instead of trying to add stuff to my domain name (since then I'd have to edit the dns server) I would configure virtual hosts for a separate port. That way it's all up to my computer. Thanks for the help nonetheless!
If this is on a Windows domain: go into the DNS management tool on the DC, and add host entries (CN records, not A records) pointing the desired names to the original computer name.
If you're doing this all on one (non-server) box: edit the hosts file, and point the names to the right IP address.