Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question

put on hold as unclear what you're asking by Pieter Goosen, kaiser 23 hours ago

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

up vote 1 down vote accepted

Canonical links are really more useful for when you have multiple URLs on the same domain pointed at the same content to help tell search engines to only index the specified URL.

What you are going to want to do is redirect that domain site.net to site.com. Trust me; things are easier that way, and it's way better for SEO purposes.

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

For the .htaccess method, you will need to create a file named .htaccess in the root of your website and put this in it.

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

Obviously, replace "site" with your actual domain name.

share|improve this answer

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

share|improve this answer
    
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 '13 at 15:57

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