If you’re new to Shadowrocket or can’t open websites or resolve internal domains after changing DNS, start with system DNS as a baseline, then test the specific resolver separately. This guide shows you where to find dns-server in your current configuration, how to distinguish an unreachable endpoint from a domain with no results or a connection failure after resolution, and how to restore your previous settings.
System DNS, Custom DNS, and DoH: What’s the Difference?
When choosing DNS, consider two separate questions: who answers the query, and how the query gets there. System DNS uses the device’s system resolution path. Here, custom DNS means entering the IP address of a traditional DNS server. DNS over HTTPS (DoH) also requires a specified resolver, but uses an HTTPS URL. This comparison covers queries handled by Shadowrocket according to its configuration; it does not mean every app uses the same resolution path.
System DNS
RecommendedUses the resolution path currently provided by the system. The DNS service in use may change when the device joins a different Wi-Fi network or switches to cellular. Network management settings on the device may also affect the result.
Best for: initial setup, preserving internal office domain resolution, and establishing a troubleshooting baseline.
Custom DNS
Sends queries to a traditional DNS server at the specified IP address. Availability depends on whether the current network can reach the DNS service at that address. Even if the resolver works on your home Wi-Fi, test it separately on any other network where you plan to use it.
Best for: when you have a specific resolver address and want to direct queries to it.
DNS over HTTPS
Sends DNS queries to a specified endpoint over HTTPS. The endpoint must be reachable, and its TLS certificate must validate. If the URL uses a hostname, that hostname must be resolved first. HTTPS protects queries in transit to the resolver; it does not add another layer of encryption to regular web connections.
Best for: encrypting DNS queries when you’ve confirmed the endpoint is reachable on your usual networks.
Test domains you rely on first
If your work depends on internal domains, test at least one known, fully qualified internal domain and one public domain. If the public domain works but the internal one fails, restore the original resolution path and check again. Don’t cycle through multiple public resolvers as a trial-and-error fix.
Change DNS for the active configuration in Config
The steps below use an iPhone / iPad configuration file as an example. Edit the file actually selected in Config; the setting is under [General]. If the file comes from a remote URL, keep a restorable copy before editing. After fetching the remote file again, check whether your local changes are still present. Don’t replace the entire configuration just to change one DNS line, or you may also change its rules and other network settings.
Check the configuration
In
Config, find the configuration currently in use and open its editing options. If there are multiple files with the same name, verify their sources first. Note the currentdns-servervalue and the selected option underHome → Global Routing.Find the setting
Under
[General], finddns-server. If the setting already exists, edit that line instead of adding a second one with the same name. Iffallback-dns-serveris also present, note its value too, so you don’t mistake a fallback result for one from the primary resolver.Enter one value
For system DNS, use
system. For traditional DNS, enter the server IP provided by your network administrator or DNS provider. For DoH, enter the complete HTTPS URL supplied by the DNS provider, including the specified path. Don’t use a service information page as the query endpoint, and don’t arbitrarily replace the URL hostname with an IP address—the certificate may not match.Save and retest
After saving, confirm that the edited file is still selected. If connected, go back to
Home, disconnect, and reconnect. Then retest the same domains in the same app on the same network. KeepGlobal Routingand the server selection unchanged so you can identify which change affected the result.
The example below shows the minimum configuration for system DNS. If [General] already exists, edit dns-server in that section without adding the section header again. To restore the previous settings, use your backup to restore the original value. If the line wasn’t there before, remove the line you added.
[General]
dns-server = system
Troubleshoot by port and error symptoms
These ports help identify which part of the connection to check; a reachable port alone doesn’t confirm that DNS is working. For example, reaching port 443 on a DoH server doesn’t mean the specified URL will return a valid DNS response. Likewise, an HTTP error when opening that URL in a browser doesn’t mean a proper DoH query will fail—a regular web request is not the same kind of request.
- First, make sure the network is connected. If the problem occurs only on hotel or public Wi-Fi, complete the network’s sign-in first, then test with your original settings. When testing over cellular, keep the configuration unchanged. If the issue occurs on only one network, check that network’s route to the resolver first.
- Next, distinguish no response from no record. If you have a DNS query tool, note the fully qualified domain name, record type, and response. A timeout means no response arrived within the allotted time.
NXDOMAINmeans the resolver reported that the domain doesn’t exist. For an NXDOMAIN result, check the spelling and whether the name can only be resolved by an internal resolver before adjusting connection timeouts. - Finally, check the connection after resolution. If you receive an
AorAAAArecord but the website still times out, check the route to the destination and whetherHome → Global Routingis set to useConfig,Proxy, orDirectas expected. DNS returns an address; it doesn’t determine the route the connection takes. Don’t test DNS by opening the destination IP directly in a browser, either: the server may need the original domain to select the site and match its certificate.
Common issues: failures on a new network, unchanged results, and inaccessible internal domains
DoH works at home but times out on another Wi-Fi network. What should I check first?
First, complete sign-in on the new network. On that same network, temporarily restore dns-server = system and test the same public domain. If system DNS works but DoH times out, check the DoH URL, whether the endpoint hostname resolves, and whether the network can establish an HTTPS connection to the endpoint. There’s no need to change routing rules or other connection settings first.
I changed DNS, but why does the browser look the same?
The two resolvers may return the same address, and the browser may reuse an existing connection or cached result. First, confirm the active configuration file and saved value, then close the test page and reconnect. Compare results using the same known-to-exist domain that you haven’t visited before. If the browser has its own encrypted DNS enabled, check whether it uses a separate resolution path.
Public websites work, but why can’t I access internal company domains?
Reconnect to a network that can access your office resources, then test the full domain provided by your administrator—not just the short hostname. If the domain resolves after restoring system DNS, check whether the office network uses records visible only to its internal resolver. If you also need to use another resolver, ask your administrator which resolver should handle internal domains. Don’t repeatedly send internal names to public resolvers to test them.
If Connectivity Test succeeds on Home, does that rule out a DNS issue?
No. A successful test only shows that the target and route used for that test worked at that time. Retest the full domain that won’t open, and record separately whether it resolves to an address and whether a connection can be established afterward. Continue investigating the resolver first only if the lookup fails. If the lookup succeeds but the connection fails, check routing and the destination service.