How to Change Your IP Address (Public and Local)

To change your public IP address, restart your router, ask your ISP for a new address, or connect through a VPN or different network. To change your local IP address, release and renew your DHCP lease or set a different address in your device's network settings.

Public IP vs local IP: know which one you are changing

Most devices have two IP addresses that matter, and they are changed in completely different ways:

  • Your public IP address is assigned by your internet service provider to your router. Every device in your home shares it, and it is what websites, games and streaming services see.
  • Your local (private) IP address is assigned by your router to each device, usually something like 192.168.1.23. It is only meaningful inside your own network.

If a website has blocked you or shows the wrong region, you need a new public IP. If you have an IP conflict on your network or are setting up port forwarding, you are dealing with the local IP. Our guide to public vs private IP addresses explains the difference in detail. Check your current public address on the WhatsMyIPNumber home page before you begin, so you can compare afterwards.

How to change your public IP address

1. Restart your modem or router

Most home connections use a dynamic IP address handed out by the ISP. Unplugging your router (or modem, if it is a separate box) and plugging it back in makes it request an address again, and sometimes the ISP issues a different one.

Results vary. Many ISPs try to give the same device the same address again for as long as its lease is valid, so a quick restart often brings back the same IP. Leaving the equipment switched off for longer, from several minutes to overnight, improves the chances on some networks. On fibre connections that use PPPoE, simply reconnecting the session from the router's admin page can be enough. If your ISP gives you a static IP, a restart will never change it, and you will need to ask your ISP instead.

2. Ask your ISP

If you need a different public address, for example because yours has landed on a blocklist, contact your ISP's support. Some can issue a new dynamic address on request; others may only offer a change by switching you to or from a static IP plan.

3. Use a VPN

A VPN does not change the address your ISP assigns, but websites will see the VPN server's IP instead, and you can choose a server in another city or country. This is the quickest way to get a different apparent address and location. See how to hide your IP address for a comparison of VPNs, Tor, proxies and other options.

4. Switch networks

Turning off Wi‑Fi and using mobile data, tethering to your phone, or connecting to a different Wi‑Fi network all give you a different public IP immediately. On a phone, toggling airplane mode on for a few seconds and off again often gets you a new mobile data address, although carriers decide how often addresses change.

A note on IPv6

If your connection uses IPv6, your devices may already change their public IPv6 address regularly. Windows, macOS, iOS and Android use temporary "privacy" addresses that rotate over time, while the network prefix assigned by your ISP stays the same until it changes the prefix itself.

How to change your local IP address

Your router's DHCP server leases local addresses to each device. Releasing and renewing the lease asks for an address again. Be aware that many routers recognise the device by its hardware (MAC) address and hand back the same IP, especially if a DHCP reservation exists. To guarantee a different address, change the reservation in your router or set a static IP manually.

Windows

Open Command Prompt as administrator and run:

ipconfig /release
ipconfig /renew

Then run ipconfig to see the new address. To set a specific address, go to Settings > Network & internet > Wi‑Fi or Ethernet > your connection > IP assignment > Edit, choose Manual, and enter the address, subnet mask, gateway and DNS servers.

macOS

Open System Settings > Wi‑Fi (or Network), click Details next to your connection, select TCP/IP and click Renew DHCP Lease. To set your own address, change "Configure IPv4" to Manually or "Using DHCP with manual address".

Linux

On systems using the classic ISC DHCP client:

sudo dhclient -r
sudo dhclient

On most desktop distributions, NetworkManager manages connections instead. Restarting the connection requests a fresh lease:

nmcli connection show
nmcli connection down "Connection Name"
nmcli connection up "Connection Name"

Check the result with ip addr.

iPhone and iPad

Go to Settings > Wi‑Fi and tap the (i) next to your network. Tap Renew Lease, or choose Configure IP > Manual to set an address yourself. The Private Wi‑Fi Address setting on the same screen controls whether the phone uses a randomised MAC address for that network; changing it makes the router see a "new" device, which usually results in a different local IP.

Android

The simplest method is to forget the network and reconnect: go to Settings > Network & internet > Internet (or Wi‑Fi), tap the network, choose Forget, then join again. To set a fixed address, edit the network, open the advanced options and change IP settings from DHCP to Static. Menu names vary by manufacturer.

Note: When setting a static local IP, pick an address in the same subnet as your router but outside the range its DHCP server hands out, or you risk an IP conflict with another device. Our router login guide explains how to view the DHCP range.

How to verify your new IP address

  • Public IP: reload the WhatsMyIPNumber home page. It shows your current public IPv4 and IPv6 addresses, ISP and approximate location. If the address is unchanged after a router restart, your ISP has reassigned the same one.
  • Local IP: run ipconfig on Windows, ipconfig getifaddr en0 on a Mac (Wi‑Fi is usually en0), or ip addr on Linux, or look in the Wi‑Fi details screen on your phone.
  • Location: if you changed your address to fix a wrong region, look it up with the IP Lookup tool. Geolocation databases can take days or weeks to reflect a change.

When changing your IP helps, and when it does not

A new address can fix an IP conflict on your home network, get you off a temporary block caused by someone who previously had your dynamic address, resolve a connection that is stuck on a bad route, or separate your activity from a previous address. It will not remove you from a site's records if you log in to the same account, and evading a ban that a service applied deliberately may break its terms of use. If your ISP has listed your address on a spam blocklist because of malware on one of your devices, clean the device first or the new address will be listed too.

Frequently asked questions

Will restarting my router always change my IP address?

No. It depends on your ISP. Many reassign the same address while the lease is still valid, and static addresses never change. Leaving the router off for longer or asking your ISP are more reliable.

Is it legal to change my IP address?

Yes. Renewing a DHCP lease, restarting a router or using a VPN are normal, legal actions in most countries. What you do with the new address is still subject to the law and to the terms of the services you use.

Does changing my local IP change my public IP?

No. The local address is assigned by your router and is invisible to websites. All devices on your network still share the same public IP.

How often does my public IP change on its own?

That varies widely between ISPs. Some connections keep the same dynamic address for months; others change it after every reconnection or at regular intervals.

Try it yourself

Put this guide into practice with our free tools.

Keep reading

Copied to clipboard