Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SimonDeDeyne's avatar

Combining a .org and .com domain for the same project.

Hi,

I have two domain names that only differ in terms of their extension (.org and .com) but would like to have the .com one redirecting to the .org one.

I use forge with Digital Ocean nginx. I was wondering if anyone has encountered a similar situation and how they handled it. For example, are there any things that need special attention (ssh certificates, how to set up the redirect config). My apologies to phrase it in a very general way, but any pointers would be greatly appreciated!

Simon

0 likes
4 replies
Cronix's avatar

For nginx, for the domain you want to redirect it would be something like:

server {
    listen      xx.xx.xx.xx:80;
    server_name domain.to.redirect.from.com;
    rewrite     ^ $scheme://domain.to.redirect.to.org$request_uri permanent;
 }

permanent indicates 301

Cronix's avatar

Also you might be able to do this with your registrar. Some let you set up domain redirects within their DNS settings.

Please or to participate in this conversation.