# Updating root domain from example.com to www.example.com breaks

**Project:** Bugs | **Board:** Planned | **Votes:** 3
**URL:** https://roadmap.ploi.io/projects/7-bugs/items/1387-updating-root-domain-from-examplecom-to-wwwexamplecom-breaks

---

There are a few things that go wrong.

- SSL certificate is deleted even though it's perfectly valid still (since the original cert was also for example.com and www.example.com just in reverse order)
- The `ssl-redirect.conf` is not modified to remove references to the now deleted certificate
- `include /etc/nginx/ssl/example.com;` is kept in the vhost config which also references the deleted certificate
- `ssl-redirect.conf` is incorrectly modifed to redirect `.example.com` and `.www.example.com` for https redirect
- `ssl-redirect.conf` is incorrectly modified to redirect `.example.com` to `example.com` (need to test this again to see what exactly happens)

End result is broken nginx configuration and broken website. Some side-effects are mentioned (removing the SSL certificate) but other (leaving a broken nginx configuration still referencing those certs) are not and I would also expect the `ssl-redirect.conf` to be left in a correct state redirecting the correct domains as if it was created using `www.example.com`.

After some manual intervention and cleanup it can be made working again obviously but I would like to have Ploi do it right in the first place :D
