Why Can't a User Access a Server by Hostname but Others Can?
A user's computer can access the internet and can successfully ping the IP address of a local file server (192.168.1.50). However, the user cannot access the file server by its hostname (fileserver.local). Other computers on the same network can access the file server by hostname without any issues. Which of the following is the MOST likely cause of this problem?
Quick Answer
The answer is an incorrect entry in the local hosts file that is preventing hostname resolution. This file, located at C:\Windows\System32\drivers\etc\hosts on Windows, acts as a local override for DNS—the operating system checks it before querying any DNS server. Since the user can reach the server by its IP address but not by its hostname, while other computers on the same network resolve the hostname correctly, the problem is isolated to that specific machine. On the CompTIA A+ Core 1 220-1101 exam, this scenario tests your understanding of name resolution order: hosts file first, then DNS cache, then DNS server. A common trap is assuming a network-wide DNS failure, but the key clue is that only one computer is affected. Memory tip: think of the hosts file as a “local dictator” that overrules DNS—if it points to the wrong IP, your computer will follow that order blindly.
⚠ Common exam trap
CompTIA often tests the distinction between IP-level connectivity and name resolution, and the trap here is that candidates assume a firewall or DHCP issue because they conflate 'cannot access by name' with 'cannot access at all', ignoring that successful IP pings rule out network-layer problems.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The computer's hosts file contains an incorrect entry for the file server.
The hosts file on the local computer overrides DNS resolution. Since the user can ping the file server by IP but not by hostname, and other computers resolve the hostname correctly, the most likely cause is a static, incorrect entry in the local hosts file that maps 'fileserver.local' to a wrong IP or is malformed. This file is checked before DNS, so even if DNS is working for others, the local computer will use the faulty entry.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The computer's subnet mask is incorrect.
Why it's wrong here
An incorrect subnet mask would break IP connectivity to 192.168.1.50, yet pinging that address succeeds, so name resolution is the failing layer. Subnet masks matter when hosts sit on different logical networks and routing, not hostname lookup, is required.
- ✗
The file server's firewall is blocking the user's computer.
Why it's wrong here
The user pings 192.168.1.50 successfully, proving the firewall permits that host's traffic; only hostname resolution fails, and other clients resolve fine. Firewall rules are tempting because they commonly block access, and would be correct if pings or connections to the server's IP were refused.
- ✓
The computer's hosts file contains an incorrect entry for the file server.
Why this is correct
A hosts file entry overrides DNS resolution locally, so an incorrect mapping for fileserver.local would break hostname access on this computer only while ping by IP still succeeds. Other machines resolving the name correctly confirms the fault is local, not server-side DNS.
- ✗
The DHCP lease has expired, and the computer has an APIPA address.
Why it's wrong here
An expired DHCP lease yielding an APIPA address (169.254.x.x) would break internet access and IP pinging too, yet both work here, so name resolution alone is failing. DHCP is tempting because it supplies IP configuration, and it would be the cause if the host had no valid address or gateway at all.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every 220-1101 question from scratch — 896 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
4 more ways this is tested on 220-1101
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A user reports that they can browse the internet and access all network resources by IP address, but they cannot print to the network printer by its hostname. Other users can print using the hostname without issue. The technician pings the printer's IP address from the affected computer and gets a successful reply. Which of the following should the technician check next?
medium- A.The printer's firewall settings
- ✓ B.The DNS server settings on the user's computer
- C.The user's network cable
- D.The router's NAT configuration
Why B: The user can browse the internet and access resources by IP address but not by hostname, which points to a name resolution failure. Since other users can print to the network printer by hostname, the printer and DNS server are functioning correctly. The issue is isolated to the affected computer's DNS configuration, making checking the DNS server settings on the user's computer the next logical step.
Variation 2. A user can access the internet and browse websites normally, but when they try to access a shared network drive by its hostname (\\fileserver\share) the connection fails. Other users on the same network can access the drive using the hostname without issue. The technician can successfully ping the fileserver's IP address from the affected computer. Which of the following should the technician check NEXT?
medium- ✓ A.The DNS server configuration on the computer
- B.The firewall on the fileserver
- C.The file and printer sharing service on the computer
- D.The network cable connection
Why A: The user can browse the internet and ping the fileserver by IP, indicating basic IP connectivity and DNS resolution for external names are working. However, accessing the share by hostname fails while other users succeed, which isolates the issue to the local NetBIOS or LLMNR name resolution on the affected computer. Checking the DNS client configuration (including the primary DNS suffix and connection-specific suffixes) is the next logical step because the computer may not be appending the correct domain suffix to resolve the single-label hostname 'fileserver' to an IP address.
Variation 3. A user reports that they can access the internet and browse other websites normally, but when they try to visit https://www.example.com, the browser displays 'This site can't be reached'. Other computers on the same network can access the website. The technician has confirmed that the computer can ping the IP address of the website's server (93.184.216.34) successfully. The DNS settings appear correct. Which of the following should the technician check FIRST?
medium- A.A. Check the browser's proxy settings
- B.B. Run the Windows Network Troubleshooter
- ✓ C.C. Verify the computer's hosts file has no entry for www.example.com
- D.D. Release and renew the DHCP lease
Why C: The hosts file (located at C:\Windows\System32\drivers\etc\hosts on Windows) is a local override for DNS resolution. Since the computer can ping the server by IP (93.184.216.34) but fails to reach the FQDN (www.example.com) via HTTPS, a misconfigured hosts entry could be redirecting the domain to an incorrect or unreachable IP, bypassing the otherwise correct DNS settings. This is the first check because it directly explains the symptom without affecting other computers.
Variation 4. A user reports that they cannot access the company's external website at www.company.com from their workstation. Other users on the same network can access the website without issues. The technician runs nslookup www.company.com and receives the correct public IP address. The technician then pings that IP address and gets a successful reply. Which of the following is the MOST likely cause of the issue?
medium- A.The website's SSL certificate has expired
- B.The user's web browser needs to be updated
- C.The company's firewall is blocking the user's IP address
- ✓ D.The user's hosts file has an incorrect mapping for www.company.com
Why D: The nslookup returned the correct public IP, and a ping to that IP succeeded, confirming DNS resolution and network connectivity are working. However, the user's browser cannot reach the website, which points to a local redirection issue. The hosts file (located at %SystemRoot%\System32\drivers\etc\hosts) can override DNS by mapping a domain to a different IP; an incorrect entry for www.company.com would cause the browser to attempt to connect to the wrong address, even though the network path is functional.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 220-1101 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 220-1101 exam.