Redirect rules

Redirect rules in Nginx

Use the following to redirect to https on nginx.

server {
listen 80;
server_name my-domain.com;
return 301 https://$server_name$request_uri;
}

Related Articles

  • Manually insert .htaccess redirect http to https

    Let Really Simple SSL handle the .htaccess redirect In most cases you can let Really Simple SSL handle the .htaccess redirect. The plugin has an option which inserts the detected...
  • 404 pages on your WordPress site when migrating to SSL

    Sometimes users have the issue that all pages get 404 errors when Really Simple SSL is activated. The cause is different from user to user and from server to server....
  • Remove .htaccess redirect on site lockout

    The .htaccess is the fastest redirect, so why not enable it by default? When you enable the setting “htaccess redirect” in settings/ssl/settings, Really Simple SSL detects the most suitable redirect,...
  • Disabling ssl for one page only

    The problem: services that don’t support SSL I think the best way to go is to get your entire site on SSL. But sometimes there are services that are not...

Leave a Comment