A static IP address for a server does not change after a reboot or reconnecting to the network; a dynamic one is assigned again on every connection and can change to a different one over time. For a website, mail, or a VPN server, the difference between them determines whether you can rely on the same address in DNS records and client settings. The difference is especially noticeable when setting up mail and VPN, where clients and partners store the server's specific address in their own configurations.
How a static address differs from a dynamic one
A static IP address is tied to a server on the provider's side and stays the same through every power-on, reboot, and network cable reconnection. A dynamic address is handed out by a DHCP server from a shared pool for a limited time and may turn out to be different on the next connection, even if the device is the same.
- a static address does not change unless the provider explicitly revokes it
- a dynamic address is issued by the DHCP protocol for a set lease time
- a server referenced by name from DNS needs a static address specifically
IPv4 addressing is covered in detail in the article what is an IPv4 address.
Comparing them by practical parameters
| Parameter | Static address | Dynamic address |
|---|---|---|
| Persistence | does not change without the provider's involvement | can change on the next lease |
| Assignment | assigned manually to the server | issued automatically by the DHCP protocol |
| Use in DNS | fits an A record for a domain | needs a dynamic DNS service |
| Typical use case | server, mail, VPN gateway | home router, workstation |
If one address is not enough, a dedicated server can be extended with additional static addresses — the process is covered in the article additional IPv4 subnets on a server.
How to check the server's current address
Finding out which address is currently assigned to a network interface takes one command.
ip -4 addr show eth0
The command prints the current IPv4 address of the eth0 interface and its subnet mask. For a static address this value does not change between checks at different times; for a dynamic one it can differ after reconnecting or after the DHCP lease expires.
What else depends on the address type
The address type also affects reverse DNS setup: a PTR record, which links an IP address to a domain name, only makes sense to configure for a static address — for a dynamic one it would go stale the moment the address changes.
A mail server is especially sensitive to this: many recipients check that the PTR record matches the sender's name and reject mail from dynamic addresses without a correct reverse record. Setting up a PTR record for your own server is covered in the article setting up reverse DNS and a PTR record.
Changing the address carries its own risks even for a static one: the sender reputation built up with mail services and partner monitoring systems is tied to a specific IP address, so it is worth accounting for when moving to another server, and worth notifying recipients in advance or updating allow-lists on their side.
What to do when choosing an address type
The choice is best made before the server goes into production — changing the address on a running service is inconvenient.
- determine whether the server will be reachable by a domain name from DNS
- check whether the server is planned to receive or send mail
- order a static address from the provider for a website, mail, or a VPN gateway
- after getting a static address, set up the domain's A record and a reverse PTR record
For a temporary test setup without external requests by domain name, a dynamic address is usually enough.
Frequently asked questions
How can I tell whether my address is static or dynamic?
The simplest way is to ask the provider directly or compare the server's address at different times: if it does not change after several reboots and reconnections, the address is most likely static.
Does a regular website need a static address?
Yes, almost always: a domain points to a server through an A record with a specific IP address, and if that address changes, the record has to be updated manually, leaving the site unreachable at the old address for a while.
Can a dynamic address be switched to a static one without reinstalling the server?
Usually yes: the provider assigns a static address to the existing server at the network level, and the server itself does not need to be reinstalled for that.