Help with steps to take when fixing cannonical url structure?
-
I would like to 301 redirect all the variations of my site to a single url but would like some clarification on some issues. I have always been confused about how to handle cannonicalization and hopefully this can clear it up for me and others.
This particular site is about 1 year old and gets approximately 15k uniques a month in a great niche. I want to make sure I do this correctly as to not hurt my existing rankings which are quite good. Here is is what I am unsure about.
- Basically I should pick the best url structure to redirect all the others to correct? What determines what url is best to redirect all the rest to? is it www.domain.com, http://domain.com or http://www.domain.com?
- Is the best one to redirect to always standard and something I should set up at the beginning of my site? Or is picking the best url to redirect to based on what url starts to rank in google and you then use that one?
- Should I be going through each of my rankings and seeing what url is ranking in google for each page? On this particular site ALL of my urls in google have no www. or http but instead show up in the SE as domain.com or domain.com/inner-page/html. In that case what do I do?
- I know the slow way to do redirects. I use my hostgator account and do it in cpanel and do it one by one. Is there a faster way where I can go and make lots of changes at once? Maybe I can choose all the variations and put in the one I want them all to redirect to?
- After I figure the above out is fixing all of this as simple as redirecting ALL variations to the one I will use moving forward for each page on my site? Then I am done?
Thanks again for the help!
Jake
-
is there a simple code I put somewhere in there?
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]replace "mysite" with the name of your site
do you see on there that he says its important to leave trailing / on folders
Generally speaking a URL that ends in a slash represents a folder. A URL that ends without a slash represents a page or file.
With respect to www or non-www, there is absolutely no preference from a pure SEO perspective. Either way you chose I would use the http:// prefix as it represents the complete URL.
-
Awesome Ryan! Thank you. This kind of stuff is the part I am SO lost about. I bet I would increase my rankings 500% if I could figure out the technical stuff!
Ok just quick clarification.
So there is no "better" version between http:// and http://www.? That is what I thought but on this guide it says that http://www. is best? http://static.seomoz.org/user_files/SEO_Web_Developer_Cheat_Sheet.pdf
I guess to be safe I could do that but I wonder if it really matters?Also do you see on there that he says its important to leave trailing / on folders.
I do know how to access my htaccess file is there a simple code I put somewhere in there? I am going to go with http://
Thanks for the awesome help!
Jake
-
What determines what url is best to redirect all the rest to? is it www.domain.com, http://domain.com or http://www.domain.com?
The "http://" portion is required for a complete URL. "http://www.domain.com" is the same as "www.domain.com". If you omit the "http://" prefix, all major browsers understand your request and will prepend the URL appropriately.
You can choose either the "www" or "non-www" form of the URL to represent your site. It doesn't matter to search engines. What does matter is that you make a choice and remain consistent.
For an existing site, examine the links you have to both URL forms. As a guide, I would recommend choosing the URL format which has the most authorative linking domains.
Is the best one to redirect to always standard and something I should set up at the beginning of my site?
Yes. You should choose before the site begins attracting traffic.
Should I be going through each of my rankings and seeing what url is ranking in google for each page?
You should make one choice for your entire site. It would be a really bad idea to have some pages use the "www" subdomain while others do not. You would be dividing your traffic into two separate domains which you do not want to do.
Use OpenSiteExplorer.org and Google WMT to determine which domain has the most linking authority.
Is there a faster way where I can go and make lots of changes at once?
You can redirect your entire site with a single statement in htaccess. Since you are using cPanel there is probably a "Redirect" application you can use to make this change. I would recommend contacting hostgator and informing them of your wishes. It is very quick and easy for a managed host to make the change for you. If you are not familiar with the process, it is far better to allow them to make the change for you.
Summary: review your backlinks, make your choice, inform hostgator and request them to make the change. After, test the change. If you choose to keep the "www" prefix, try accessing a few pages without the prefix. You should reach the page and see the "www" portion added to the URL. If the process is set up correctly you are 100% done.
Some SEOs may advise you to use canonicals or update your choice in Google/Bing Webmaster Tools. You can do both but once you set the redirect correctly the results will take care of themselves. Expect it can take up to a month for all of your URLs to appear correctly in SERPs. If you update the change in WMT, it will appear faster in SERPs.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Folders in url structure?
Hello, Revamping an out-of-date website and am wondering if I need to include the folders (categories) in the url structure? The proposed structure has 8 main folders. I've been reading that Google is ok if the folder is not included in the url, but is it really? The hesitation I have is that the urls are getting long and the main folder only has only a sub folder beneath it. So, /folder-name/facility-name/treatment-overview. This looks too long, doesn't it? Thanks!
Technical SEO | | lfrazer1230 -
Clean URL vs. Parameter URL and Using Canonical URL...That's a Mouthfull!
Hi Everyone, I a currently migrating a Magento site over to Shopify Plus and have a question about best practices for using the canonical URL. There is a competitor that I believe is not doing it the correct way, so I want to make sure my way is the better choice. With 'Vendor Pages' in Shopify, they show up looking like: https://www.campusprotein.com/collections/vendors?q=Cellucor. Not as clean. Problem is that Shopify also creates https://www.campusprotein.com/collections/cellucor. Same products, same page, just a different more clean URL. I am seeing both indexed in Google. What I want to do is basically create a canonical URL from the URL with the parameter that points to the clean URL. The two pages are very similar. The only difference is that the clean URL page has some additional content at the top of the page. I would say the two pages are 90% the same. Do you see any issue with that?
Technical SEO | | vetofunk0 -
Keywords, when are you overdoing it in the URL?
Hi guys, I'm auditing a site covering compensation for cancer. Keywords could include: Undiagnosed cancer 20 cancer compensation 10 undiagnosed cancer symptoms 10 cancer misdiagnosis claims 20 cancer claims 10 misdiagnosis of cancer 50 cancer misdiagnosis 70 So, when structuring the URL for the category, this was previously selected: www.site.co.uk/medical-negligence/cancer-misdiagnosis Although sub-pages appear like this: www.site.co.uk/medical-negligence/cancer-misdiagnosis/breast-cancer-misdiagnosis-claim/ 'Cancer misdiagnosis' as a keyword attracts the most traffic, but if we're using it on sub-pages - is there a need to include it twice on all sub-page URLs? With that in mind, would it be better to follow the following format? www.site.co.uk/medical-negligence/cancer-compensation www.site.co.uk/medical-negligence/cancer-compensation/breast-cancer-misdiagnosis-claim/ Or is there a better way to structure this? Thanks in advance guys!
Technical SEO | | Muhammad-Isap0 -
Multilingual Blog Structure
Hi I have a domain in 20 languages. I want to integrate a wordpress blog (in subfolders) in the 3 most important languages like EN-ES-FR (actually they will be 3 independent blogs) and I want to know which structure is the best one. OPTION 1 domain/en/blog/post1 domain/es/blog/post1 domain/fr/blog/post1 OPTION 2 domain/blog_en/post1 domain/blog_es/post1 domain/blog_fr/post1 Last question. For the rest of the 17 languages of my domain, can I put a link the english blog or is not recommended because maybe too many pages will be linking to the blog? Thank you
Technical SEO | | andromedical0 -
20 000 duplicates in Moz crawl due to Joomla URL parameters. How to fix?
We have a problem of massive duplicate content in Joomla. Here is an example of the "base" URL: http://www.binary-options.biz/index.php/Web-Pages/binary-options-platforms.html For some reason Joomla creates many versions of this URL, for example: http://www.binary-options.biz/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html or http://www.binary-options.biz/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html?q=/index.php/Web-Pages/binary-options-platforms.html So it lists the URL parameter ?q= and then repeats part of the beforegoing URL. This leads to tens of thousands duplicate pages in our content heavy site. Any ideas how to fix this? Thanks so much!
Technical SEO | | Xmanic0 -
How do you take down a link
Salut from Sunny wetherby UK 🙂 Having just watched a whiteboard fri clip all about the "Penguin Update" i want to know how to take down a link. I feel a site ive been working on has been pecked by the penguin. I did build inbound links on a specific commercial term and shiver me timbers is dropped oof the SERPS from top 5 to ziltch, yiles!! So my questiuon is please:
Technical SEO | | Nightwing
if you find an inbound link using a target term how do you kill it? Thanks in advance :_)0 -
URL rewriting from subcategory to category
Hello everybody! I have quite simple question about URL rewriting from subcategory to category, yet I can't find any solution to this problem (due to lack of my deeper apache programming knowledge). Here is my problem/question: we have two website url structures that causes dublicate problems: www.website.lt/language/category/ www.website.lt/language/category/1/ 1 and 2 pages are absolutely same (both also returns 200 OK). What we need is 301 redirect from 2 to 1 without any other deeper categories redirects (like www.website.com/language/category/1/169/ redirecting to .../category/1/ or .../category/). Here goes .htaccess URL rewrite rules: RewriteRule ^([^/]{1,3})/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /index.php?lang=$1&idr=$2&par1=$3&par2=$4&par3=$5&par4=$6&%{QUERY_STRING} [L] RewriteRule ^([^/]{1,3})/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /index.php?lang=$1&idr=$2&par1=$3&par2=$4&par3=$5&%{QUERY_STRING} [L] RewriteRule ^([^/]{1,3})/([^/]+)/([^/]+)/([^/]+)/$ /index.php?lang=$1&idr=$2&par1=$3&par2=$4&%{QUERY_STRING} [L] RewriteRule ^([^/]{1,3})/([^/]+)/([^/]+)/$ /index.php?lang=$1&idr=$2&par1=$3&%{QUERY_STRING} [L] RewriteRule ^([^/]{1,3})/([^/]+)/$ /index.php?lang=$1&idr=$2&%{QUERY_STRING} [L] RewriteRule ^([^/]{1,3})/$ /index.php?lang=$1&%{QUERY_STRING} [L] There are other redirects that handles non-www to www and related issues: RedirectMatch 301 ^/lt/$ http://www.domain.lt/ RewriteCond %{HTTP_HOST} ^domain.lt RewriteRule (.*) http://www.domain.lt/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.)/$RewriteRule ^(.)$ http://www.domain.lt/$1/ [R=301,L] At this moment we cannot solve this problem with rel canonical (due to our CMS limits). Thanks for your help guys! If You need any other details on our coding, just let me know.
Technical SEO | | jkundrotas0