title: TYPO3 9: Domain routing and redirects with site management
body: <p>How can I configure my TYPO3 website by using the new <em>Site management</em> module to match these tasks:</p>
  
  <ol>
  <li>domain.tld should be the base </li>
  <li>www.domain.tld should redirect to domain.tld</li>
  <li>SSL should be enforced as well</li>
  </ol>
  
  <p>With earlier versions of TYPO3 i have achieved this by creating two domain records: one for domain.tld and the other for www.domain.tld, defined as permanent redirect to <a href="https://domain.tld" rel="nofollow noreferrer">https://domain.tld</a>. SSL was enforced by htaccess:</p>
  
  <pre><code>RewriteCond %{HTTPS}s ^on(s)| [NC]
  RewriteRule ^(.*) http%1://domain.tld/? [R=301,L]
  </code></pre>
  
  <p>In the <em>Site management</em> module of TYPO3 v9 I defined '<a href="https://domain.tld" rel="nofollow noreferrer">https://domain.tld</a>' as <em>Entry point</em>. This works fine so far, but requests for 'www.domain.tld' or '<a href="http://domain.tld" rel="nofollow noreferrer">http://domain.tld</a>' are resulting in a redirect error. I have created the domain records for 'www.domain.tld' and 'domain.tld' as well.
  Meanwhile I have changed the entry point to '/', at least the requests for 'www.domain.tld' are working now. 
  But what is the best practice to achieve the goals by using the <em>Site management</em> and <em>Redirects</em> modules?</p>