How do I add the rel code to specify my canonical (preferred) URL in the Premium Website Builder?

Asked by:
Web Profit Experts
Time:
2011-11-16 8:43 pm
Category:
How To
Hits:
663
Canonicalization is a big problem for SEO. That is where some links go to the www version of your website and some go to the non-www version. There is a rel code for canoncializing your site.

How would I add this custom rel code to my site?

Thanks.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by Web Hosting Hub staff

0

ChristiNi
2011-11-16 9:19 pm
Hi,

Great question! I see you're using the Premium Website Builder. Normally the rel tag is placed between the <head> tags, but that would require manual editing of your site files and would be overwritten if you ever republished your site from the builder.

A much more efficient way to handle this would be to force everything to go either go through www or non-www using your .htaccess file.

You can redirect the non-www domain over www by adding this to your .htacess file.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.org
RewriteRule (.*) http://www.yourdomain.org/$1 [R=301,L]

Alternatively you can go the other direction and redirect www over non-www by adding this to your .htaccess file instead:


RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.org$ [NC]
RewriteRule ^(.*)$ http://yourdomain.org/$1 [R=301,L]

You can edit your .htaccess file using the File Manager in cPanel. Make sure you select the option to "Show Hidden Files" when opening the File Manager.

Please let us know if you have any questions or need any additional assistance.

Regards,

Christi N.

You must login before you can post a comment about this answer.

Like this Question?

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Site under brute force attack
  2. URLs in Installation of WordPress Don't Redirect
  3. Choosing a Directory With WordPress

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.