Redirect all requests to the a preferred domain

In many cases a website or web application should be accessible by multiple domains.  The Problem is, that google could treat that as duplicated content (https://support.google.com/webmasters/answer/66359?hl=en) and also the trust is divided between all domains.  That’s why google suggests to choose a preferred (canonical) destination URL and to redirect all requests to the a preferred domain (https://support.google.com/webmasters/answer/93633?hl=en). To achieve that, […]

Redirect all traffic to another URL via htaccess

To redirect all traffic to another URL, you can use the following Redirect-declaration in your .htaccess file.

For example this redirects all calls to my profile domain http://www.marcel-lange.info to my linkedin account.

Force HTTPS for WordPress Installations

Just add this snippet to the beginning of your rewrite section of your .htaccess file to force HTTPS:

As you can see, I placed it directly under “RewriteEngine On”. Or you can also  use this Snippet to force HTTPS for your application:

Force HTTPS behind a proxy If you are behind a proxy […]