# Nginx: nginx: [warn] conflicting server name "example.com" on 0.0.0.0:80, ignored

**Code:** `nginx: conflicting server name ignored` · **Category:** Nginx / Apache · **Seen on:** Nginx, Linux

Two server blocks listen on the same port with the same `server_name`; the second is ignored.

## 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

1. `sudo nginx -T | grep -n server_name` and remove duplicates
2. Delete backup/symlink copies in `sites-enabled`
3. Keep one block per name and port

## Detailed fix by platform

### Linux

1. `ls -l /etc/nginx/sites-enabled /etc/nginx/conf.d`

## How to diagnose

1. **Names** — Duplicates?
2. **Files** — Backups included?
3. **Listen** — Same port?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nginx-apache/nginx-conflicting-server-name)
