The PS4 error code NW-31254-5 is a more obscure error code that doesn’t appear as much as the closely related NW-31253-4 error, but often arises from a similar cause and can be fixed the same way. An error message comes up saying that the response from the DNS server is delayed or unstable. How can we fix this error message and get the PS4 back online?
This error arises because the Domain Name System or DNS servers are not working or have been put in incorrectly. DNS servers are very important as they map domain names (eg playstation.com) to IP addresses. We can’t get our devices online without them so if they aren’t working we need to take steps to change them.
The most common way to fix the NW-31254-5 error is to manually configure the DNS settings on your PS4 to Google DNS (18.104.22.168; 22.214.171.124) or another provider. Alternatively, you may also need to reset your PS4 back to Default Settings in Safe Mode first, and then change the DNS Settings to Google DNS.
Let’s look at these solutions in turn – firstly with the quick DNS settings options, then the more detailed Default Settings option along with manually changing DNS settings.
Solution #1 – Manually Configure the DNS Settings on Your PS4
The most common solution to this problem is to simply reconfigure the internet connection of your PS4, but by manually inputting your own DNS servers instead of letting the PS4 choose them automatically. When on Automatic, your PS4 will use the default DNS servers provided by your ISP, which may be down at the moment, hence the error message.
Changing the DNS servers to a different pair like Google DNS or a different free provider, can get around this problem and get you back online. This solution works for the majority of cases of this error code.
Here are the steps for manually changing your DNS servers:
- Go to Settings….Network……Set Up Internet Connection
- Select Wi-Fi or LAN depending on your connection. Plug into your router and use wired if the wifi doesn’t work.
- Select Custom setup
- Run through all the settings as they are, without changing them, until you get to DNS Settings
- For DNS Settings, switch to Manual
- Input these Google DNS servers: Primary: 126.96.36.199 Secondary: 188.8.131.52
- You can also use other free DNS servers; here are two common pairs:
- Cloudflare DNS – Primary 184.108.40.206 Secondary 220.127.116.11
- Open DNS – Primary 18.104.22.168 Secondary 22.214.171.124
- If one pair don’t work, try another pair. See our article on the best DNS for gaming for more information.
- If you are already using your own custom pair of DNS servers and are getting this error, then try switching to another pair of manual servers, or else switching back to Automatic settings for DNS.
- See just below for a video demo of how to do this.
Solution #2 – Restore Default Settings on Your PS4 & Then Change DNS Settings
Sometimes though, just changing the DNS settings as we detailed above does not fix this error code. Sometimes, we need to do a more fundamental reset on our PS4 to clear out all current network settings/caches and start again.
This can be the case for a number of reasons; here are some examples:
- If you have not logged into PSN for a long time.
- If you have recently moved house.
- If you have changed to a new internet provider.
- If you have changed to a new router.
- Any other scenario where something fundamental has changed in the network environment.
In these cases, the NW-31254-5 error is likely occuring because you are trying to map old network settings to a new networking environment where something fundamental has changed (eg. new house, new router etc). There is a mismatch there which means the settings stored on the PS4 are not going to work anymore.
To fix this, you need to restore the Default Settings on your PS4 to flush out all existing network settings and start over with default settings. These should then match up properly to your new network and allow the PS4 to get back online.
Here are the steps to do this:
- Power your console off then power it back on in Safe Mode. To do this, press and hold the power button on the PS4 for 7 seconds. It will then boot in Safe Mode.
- You need to plug your controller in with the USB cable to use it in Safe Mode.
- Once in Safe Mode, you need Option 4 – Restore Default Settings.
- This restores all the network and other settings on your PS4 to “out the box” default settings. It does not delete any game data so you don’t need to worry about this.
- See the video below for a demonstration of how to use the PS4 Safe Mode.
- Then, once you have restored the Default Settings, manually configure your DNS settings as mentioned in Solution #1.
Other Things to Try Fixing Error NW-31254-5
If neither of these two options worked, then it is more of a puzzle what is causing this error message. Here are some other things to try to get your PS4 back online:
- Quick reset your router and PS4 a few times.
- Fully reset and power cycle your PS4 and router by unplugging them for 10 minutes and then restarting them.
- Check that other people can connect on your network and that your ISP is not having problems.
- If on WiFi, move your PS4 and router closer together.
- Try to get off WiFi altogther and onto a wired connection if possible. A powerline adapter is a good solution if you can’t run a long cable directly to your router.
- In very rare cases, the error might be showing because the PS4 cannot even find an IP address. In these cases a System reset as per Solution #2 usually does the trick, though manually setting a static IP address as per Solution #3 of this article can sometimes resolve the issue.
This is one of the rarer PS4 error codes and we could not find as much information about it online as for other NW error codes. Nevertheless, we gathered together the main solutions here.
If anyone still can’t get rid of this error message after trying all these options, then leave a comment below or check out our other PS4 error code articles.