כיצד ליצור הפניית 301 לדומיין חדש

In general, I configure it like so:

server {
    listen 80;
    server_name domain1.com;
    return 301 https://domain2.com$request_uri;
}

The above directive can be ammended in a lot of ways to better suit your needs.