The PS4 NW-31251-2 error code is one of the more obscure and rare error codes for the Playstation 4, but does come up for gamers from time to time. Somtimes users with this error code can at least connect to the internet, but just not to PSN; other times their connection fails at the first step and they cannot even get online at all.
This error code was particularly common for North American users on the AT&T network in the autumn of 2016, suggesting that a certain router or console update at that time was causing certain settings to clash. There are usually ways around these networking errors though.
The first thing to try and solve this error code is to manually change the DNS servers on your PS4 to Google DNS (22.214.171.124; 126.96.36.199) or another free provider. If this doesn’t work, then running through some quick and hard resets on your router and PS4, plus restoring default settings or rebuilding your PS4’s Database, are the next options to try and get rid of this error message.
PS4 gamers who get this error code seem to report that all other devices on their home network seem to work fine, which indicates it is more a problem with how the PS4 and router, as well as the ISP like AT&T, are interacting together with their settings that is somehow blocking connectivity. Playing around with the network settings, we can usually get back online again.
Let’s look in more detail at the DNS option first, followed by some more things you can try if this solution doesn’t work.
Solution #1 – Manually Change the DNS Servers on Your PS4
The very first thing to try if you get this error code is to reconfigure the internet connection on your PS4, so that you input your own manual DNS servers such as Google DNS instead of using the ones supplied by your ISP.
This appears to solve the error in many but not all cases. There may be a problem with the DNS servers that your ISP would normally use and this is stopping you connecting to the Playstation Network.
Here are the steps to manually set your DNS servers on your PS4:
- 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: 188.8.131.52 Secondary: 184.108.40.206
- You can also use other free DNS servers; here are two common pairs:
- Cloudflare DNS – Primary 220.127.116.11 Secondary 18.104.22.168
- Open DNS – Primary 22.214.171.124 Secondary 126.96.36.199
- If one pair don’t work, try another pair. See our article on the best DNS for gaming for more information.
- See just below for a video demo of how to do this.
Make sure you run through the setup of your connection correctly according to whether you are on wired or wireless. The guy in the video selects LAN because that’s what he’s using; obviously if you are on wireless then select WiFi instead and proceed from there. The setup menus are virtually identical either way.
Solution #2 – Try Resetting Your Router & PS4
If this DNS solution doesn’t work, then the next thing to try is to do some quick and hard resets on your PS4 and router to try and flush out any existing network settings and start fresh with new ones. This can sometimes restore connectivity.
Here are the very first things to try with resets:
- Quick reset your router and PS4, just restarting them both.
- Hard reset (power cycle) your router and PS4, powering them off and fully unplugging them for 5-10 minutes before plugging them back in.
- With these hard resets, also make sure you fully unplug everything and also power things on in the correct order, doing the router first, waiting for it to fully initialize, then the PS4 after the router has come fully online.
- Try restoring factory settings on your router, pushing in the reset button which should be on the side or back somewhere.
If none of these solutions work, then you can do some more fundamental reset and repair work on your PS4, restoring it to default settings and also fixing any corrupt files on the hard drive. You need to do these in the PS4’s Safe Mode. Here are the general steps:
- 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.
- Once in Safe Mode, first try Option number 4 – Restore Default Settings. This restore all network settings back to default on the PS4 – it does not delete any data.
- Run through this option, then try reconfiguring the internet connection on your PS4, either using Automatic/Easy settings or trying manual DNS settings as above in Solution #1.
- If this doesn’t work you can also try going back into Safe Mode and trying Option 5 – Rebuild Database – instead. This fixes any corrupt files on your PS4 which may be causing connection errors. May take up to an hour.
- Try reconfiguring your internet connection again as above.
- See the video below for a demonstration of how to get into and use Safe Mode on the PS4.
Other Solutions For PS4 Error NW-31251-2
If even these solutions don’t work, then we are running out of options to fix this error code. It may simply be a fault with our ISP that you need to wait for them to fix. However, here are some other last ditch things to try:
- When trying the DNS solution, make sure you try the other pairs of DNS servers from Cloudflare and OpenDNS as well if the Google ones don’t work.
- Sometimes you may just need to wait for a few hours, either for network settings to refresh or your ISP to sort out problems from their end.
- You may be living in a country which is blocking your PS4 from accessing the PSN servers. Try using a VPN or Proxy server on your PS4.
- Try setting a Static IP address for your PS4 as per Solution #3 of this article.
- You can also try using some kind of port forwarding to get around any firewall restrictions that are being imposed by yout ISP. See our article on different ways of port forwarding, plus our article on using the quickest and easiest method of DMZ settings to do this.
- Contact your ISP for any further suggestions. On rare occasions they may give you some additional alternative DNS servers to try inputting on your PS4.