Most home PCs get their IP address automatically from the router using DHCP, and Microsoft recommends sticking with DHCP for most people. A fixed (static) IP address is still useful in some situations: when you share files or a printer from your PC, run a game or media server, host a local AI server for other devices, forward a port on your router or use Wake-on-LAN. This guide follows Microsoft's official instructions for Windows 11. Router menus vary by manufacturer.
Before you start: plan your address
A static IP only works well if it doesn't clash with another device. Before changing anything, note your current settings:
Open Settings > Network & internet, then select Ethernet or Wi-Fi and your connection.
Note the IP address, DNS servers and other details Windows shows for that connection.
You'll need four things for a manual setup: an IP address, a subnet mask (or prefix length), a gateway (usually your router's address) and at least one DNS server. Pick an address on the same network as your router that no other device is using. Many routers let you see which addresses they hand out through DHCP; check your router's manual and choose an address outside that range, or use your router's address reservation feature instead (see below).
Method 1: Windows 11 Settings
Microsoft's steps are the same for Wi-Fi and Ethernet, apart from where you find the connection:
Go to Settings > Network & internet.
For Wi-Fi, select Wi-Fi > Manage known networks and choose the network. For Ethernet, select Ethernet, then the network you're connected to.
Next to IP assignment, select Edit.
Under Edit IP settings, choose Manual, then turn on IPv4.
Enter the IP address, Subnet mask and Gateway.
Enter a Preferred DNS and, optionally, an Alternate DNS server.
Optionally choose a DNS over HTTPS setting for each DNS server. Microsoft notes this option isn't available in Windows 10.
Select Save.
To go back to automatic settings, return to the same page and choose Automatic (DHCP). Microsoft says the IP address and DNS server settings will then be set automatically by your router or access point.
For Wi-Fi, Microsoft's steps set this for the saved network you choose under Manage known networks. If you want to change only your DNS server, our guide to changing DNS in Windows 11 covers that separately.
Method 2: PowerShell
Microsoft's New-NetIPAddress cmdlet creates and configures an IP address from PowerShell. Microsoft's example adds an IPv4 address to the network adapter at interface index 12:
New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.0.1 -PrefixLength 24 -DefaultGateway 192.168.0.5
Replace the interface index, IP address and gateway with your own values. Microsoft explains that a prefix length of 24 is the same as a subnet mask of 255.255.255.0, and that the default gateway must be in the same subnet as the IPv4 address. It also notes that if you add an IP address to an interface where DHCP is enabled, DHCP is automatically turned off. You'll typically need an administrator PowerShell window, and to remove the address again, Microsoft's example uses Remove-NetIPAddress.
Alternative: reserve an address on your router
Many routers offer DHCP reservation, which tells the router to always give the same address to your PC. Your PC stays on automatic settings, which can avoid manual address changes on the PC. The option's name and location depend on your router, so check its manual.
What to do next
With a fixed address, it's easier to map a network drive, set up Wake-on-LAN, or share Ollama on your local network. If games lag when others are streaming, see setting up QoS on your router.
Our verdict
For most people, DHCP is the right default. If you need a PC to stay at the same address, set it under Settings > Network & internet > IP assignment > Edit > Manual, or use New-NetIPAddress in PowerShell, and pick an address that won't clash with other devices. A DHCP reservation on your router is often the tidier option.