If you have more than one domain name with differing suffixes such as:

www.domain.com
www.domain.co.uk

If you need to point the .co.uk domain to the.com domain then enter the following code into your .htaccess file

RewriteEngine on
RewriteCond %{HTTP_POST} !^www.domain.com
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

So now if the domain is not www.domain.com then everything after the domain will be redirected via a 301 direct to the www.domain.com site.

Dealing with multiple domain names