Approved: Fortect
It’s worth reading these troubleshooting guidelines if you get an error that the hosts file is not redirecting the domain.
Based on my own experience and what I found when searching on Google, here are a few things you should definitely try:
1. Have You Verified That It Works Correctly?
The host changes should take effect at this point, but Windows just caches the name resolution data for a while, old accounts can be used. Open a queued command (Windows + R, cmd
, Enter) and type:
Approved: Fortect
Fortect is the world's most popular and effective PC repair tool. It is trusted by millions of people to keep their systems running fast, smooth, and error-free. With its simple user interface and powerful scanning engine, Fortect quickly finds and fixes a broad range of Windows problems - from system instability and security issues to memory management and performance bottlenecks.
ipconfig / flushdns
To delete some old data. To check if this works, use theThen (assuming you have an IPv4 license on your host www.example.com or a specific ipv6 entry on your hosts for ipv6.example.com):
ping www.example.com -n 1ping -6 ipv6.example.com -n 1
Log in as a regular administrator.Before focusing on the desktop or documents, create a new hosts file.Edit (using Cure format) and save the hosts file using Windows Notepad.Navigate to the location of the actual host content and rename it.
And while it is using the correct IP. If so, your file host is exceptional and the problem is elsewhere; you
can also occasionally flush the NetBios cache with (open the current console as administrator, otherwise it will surely fail):
nbtstat -R
You can check the current DNS cache entry with:
ipconfig / displaydns | Next
NB: nslookup
does not check which hosts file is in use. See NSLOOKUP and NBLOOKUP return the IP address; PING finds another
2. Basics
- Is your hosts file named correctly? Ideally these are
hosts
, nothosts
etc. - Is the extension usually correct? It shouldn’t have Not ext (
hosts
hosts.txt
) – be careful, if you’ve configured Windows to hide installed extensions, check the properties actually: correct hosts file type will display simply as “file”. - Did you follow the si correctly Tax? Did you accidentally place a hash mark (
#
) in front of it for comments from family members? - Have you accounted for all the differences (
www.example.com
andexample.com
– it’s safest to just combine them)?
3. Space
The format of each line is treated as IP address
, then horizontally as an abbreviation (escape code t
, ASCII HT
, hex < code> 0x09 ) or one space (hex 0x20
) then you will see the hostname i.e. www.example.com
then finally give an incorrect result followed by a string (escape codes r n
, ASCII CRLF
, hex 0x0d 0x0a
). Posts,
Example with Unicode control screens for specifying control characters. Copy (don’t paste it into your hosts file!)
Go to the connection properties of your operator, set Let’s go to TCP / IP settings and differentiate the first DNS server from 127.0.0.1. 0.1 (localhost). The second should probably be your current DNS IP. This is not necessary for the hosts file to work, although it might help in your case if things are bizarre.
192.0.2.1â ‰ www.example.comâ â Š2001: db8: 8: 4 :: 2â ipv6.example.comâ
Individual potential bytes can be viewed in Notepad ++ with all hex editor plugins. Notepad ++ also displays special characters (View -> Show Icon) so that you can easily check the number without counting the spaces.
If you copyIf you have copied and pasted records from somewhere and from hosts, you may have a few spaces left. Hosts theoretically support multiple spaces separating some of them, but this is another thing to look out for if nothing works.
For security, make sure all lines in your hosts file use tabs and spaces, not both.
4. Registry Key
There is a good reliable registry key that usually specifies the location of the hosts file. Obviously Windows doesn’t support pasting the hosts file to other websites, but you can check it out. Key:
HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Services Tcpip Parameters DataBasePath
% SystemRoot% System32 drivers etc.
5. Permissions
Sometimes there are problems with using file permissions, attributes, manual save, etc. To restore a database with standard permissions:
- Create a new text in the file on the desktop.
- Copy the theme from the current hosts file and paste it into this Notepad skills file.
- Save onlyoh what sent text and rename it to
hosts
. (do - do not copy the file or move it to the list
% SystemRoot% System32 drivers etc
and overwrite the old file.
How to redirect Amazon to a subdomain?
You can create an “activation” association by going to smile.amazon.com (a subdomain of Amazon.com). I really want to use the Windows 10 host image for redirection when I type amazon.com to automatically go to smile.amazon.com so that the new charity always wins.
The most important
users should be able to read a specific hosts file. Just in case (on Windows 7):
- Navigate to
% SystemRoot% System32 drivers etc
in explorer windows. - If the
hosting
file is difficult to see, make sure your organization can see hidden files and system files. - Right-click the
hosts
file and selectProperties
from the context menu. - click the
Host Properties
door on theSecurity
tab. - Examine the list of subscriber names in the
Group or Person Names:
field. If there is% computername% users
, select it to view the permissions.Users
- If it doesn’t exist, or doesn’t exist without question, but it doesn’t have
Read
permission, clickEdit ...
.User
- If still doesn’t exist, click
Add ... Type
,User
, clickCheck Names
and click OK. Enter. - Select and
User
, make sureRead and Execute
is checked in theAllow
box. Click OK. If theWindows Security
notification window appears, selectYes
to continue. - Click OK to close the
Hosts Window Properties
window. - Go to section 1 at the top of this option and follow the instructions to check if it works now.
6. Encoding
If you haven’t, the hosts file must be ANSI or UTF-8 encoded. You can do this with File -> Save As.
7. Representatives
Can a hosts file be used to redirect a website?
You can not. A redirect usually requires the web server to accept the first request and return the redirect. The hosts file only allows you to control your ownership of DNS records. No, but could you, for example, provide a web server 127.0.0.77 to check if the request URI is usually “/welcome.aspx” … if yes, redirect to Google, otherwise the malware download page? …
If you have configured a proxy, you can bypass the host startup. The solution is not to use this proxy, or configure it to not use this skill.
To check this, go to Internet Explorer -> Internet Options -> -> LAN Settings for Connections. If everything is empty, except for the “Automatically detect settings” checkbox, you are not using a proxy.
If you rely on a proxy server to access the Internet There is no and therefore you don’t need to disable it, you can just try adding exceptions by going to Internet Explorer -> Internet Options -> Connections -> LAN Location -> Proxy go to Server / Advanced. Then add the exceptions to the Exceptions text package. e.g. localhost; 127.0.0.1; *. developer
8. DNS Address
Go online with your valuable connection properties, then in TCP / IP settings and rethink the first DNS server to 127.0.0.1
(localhost). The second should probably be the real IP of your DNS.
This is not required for all host files to work, but will probably help you in your case if something is optimized in a weird way.
9 .. Local Addresses
If you are using the .local login domain when creating myhost. And locally it will be ignored, you should try this:
x.x.x.x myhost.local www.myhost.local
even if your www.myhost.l
Inserting a redirect to enter the hosts file is very easy. Just enter the IP address of the web server or host you want, leave one space, and then just enter the domain or hostname that your organization wants to refer to that IP address. Enter only one forward per line.
How do I redirect a URL in host file?
It is very easy to add a redirect to a sample file. Just enter most of the IP address of the forum or host you want, leaving one space, and then enter the domain or possibly the hostname you want that IP address to go to.called. Enter only one direct message per line.
Can hosts file point to another domain?
Yes, but is there a way to point the url to a url instead of an IP address? You cannot provide a web link to another URL with the file to stream.
Does hosts file override DNS?
Editing the Family Hosts file allows you to override the Domain Name System (DNS) to create a domain on a specific hosting server. DNS management is useful when you want to check if your site will get a test link before going live with SSL, that the alias site will work before the DNS change, and for other DNS related destinations.
How do I know if my host file is working?
In Windows Explorer, navigate to% SystemRoot% System32 drivers and so on.If you don’t see the broadcast file, make sure you see non-visual and system files.Right-click the file it contains and select Properties from the main menu.On the Host Properties screen, click the Security tab.