To avoid duplicate content, it’s adviced that any given content on your site only has one URL.
If you, like me, have a website built in Express, then you probably have a hard time getting your primary domain to work.
But with nginx it’s pretty simple to work around that.
All you have to do is to create a new rule that takes all your secondary domains and rewrite them to your primary domain.
1 | # This rule catches all trafic to 'www.martinnielsen.me' |
Once you’ve made the change, you should restart your nginx service with sudo service nginx restart