-1

I want visitors who have typed site.com, stay on site.com and visitors who have come to site.net, stay at site.net (They have one host and site.net has been parked on .com).

When it comes to search engines, because of SEO they should understand that the both domain are locating to the same host. I know that I should do it with canonical links.

I searched and got that I should install WordPress SEO Plugin located at http://yoast.com/wordpress/seo/#canonical

But now I see that the image at the link which is: what I should see,

is different from what I see at my wordpress admin panel: what I see

So I have only 3 options: Leave default (selected right now), http and finally https.

I expected to have a text box so that I could enter site.com to force google redirect visitors to site.com; Also note that my version is different what I should see as the the example has stated.


IF the solution with Yoast wordpress SEO plugin is the best way, please help me to understand what should I do.

ELSE IF!!! you know a better solution, please tell me to use the new one!

2 Answers 2

1

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>
0

I agree with XIROXAS, but if for some reason you really do want to do it the way you described, it's probably already done for you anyway. Yoast SEO should already be adding a <link rel="canonical"> in your header, based on your site url setting, which I would imagine uses the tld you consider to be the main one.

This is assuming you don't have separate Wordpress installs for each tld...

1
  • Thank you @AngusRussell, but when I go to site.com, I see <link rel="canonical" href="http://site.com" /> and when I visit site.net, I see <link rel="canonical" href="http://site.net" />.
    – smhnaji
    Jun 9, 2013 at 15:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.