Nginx: nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored
Two server blocks listen on the same port with the same server_name; the second is ignored.
nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignoredconflicting server name ignored nginx[warn] conflicting server name on [::]:443, ignorednginx conflicting server name warning Meaning
Nginx picks the first matching server block, so requests may serve the wrong site. Search for duplicates (nginx -T | grep server_name), remove or rename the duplicate, and check sites-enabled for old copies or symlinks.
Common causes
- Same domain defined in two files
- Old config left enabled (backup copies like
example.com.bak) - Symlinks duplicating files
- HTTP and HTTPS blocks mistakenly with the same listen
- Wildcard overlap
⚡ Quick fix
sudo nginx -T | grep -n server_nameand remove duplicates- Delete backup/symlink copies in
sites-enabled - Keep one block per name and port
Detailed fix by platform
Linux
ls -l /etc/nginx/sites-enabled /etc/nginx/conf.d
How to diagnose
- Names — Duplicates?
- Files — Backups included?
- Listen — Same port?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- could not build the server_names_hash, you should increase server_names_hash_bucket_size Nginx: nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 64
- nginx: [emerg] open() failed (2: No such file or directory) Nginx: nginx: [emerg] open() "/etc/nginx/snippets/fastcgi-php.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/app:20
- nginx: [emerg] unexpected end of file, expecting ";" or "}" Nginx: nginx: [emerg] unexpected end of file, expecting ";" or "}" in /etc/nginx/conf.d/site.conf:42
Most viewed in Nginx / Apache
- nginx: [emerg] unknown directive Nginx: nginx: [emerg] unknown directive "x" in /etc/nginx/sites-enabled/x:12 — configuration file test failed
- upstream timed out Nginx: upstream timed out (110: Connection timed out) while reading response header from upstream
- AH00558 Apache: AH00558: apache2: Could not reliably determine the server's fully qualified domain name
Other ways to find it
Where this error sits
Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026