Enabling canonical links to force search engines to go to site.com rather than site.net [closed]

Canonical links are typically used when you have multiple URLs on the same domain pointed at the same content to prevent search engines from indexing duplicate content.

In this case, redirecting the domain is probably the best option.

You can do that either through the control panel for your domains or with a .htaccess file.

The .htaccess Method

You will need to create a file named .htaccess in the web root of your site that instructs the web server to redirect traffic.

For example, if you’d like to redirect example.net to example.com you could do something like

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.example\.net [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301]
RewriteCond %{HTTP_HOST} ^example\.net [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301]
</IfModule>