Canonical url question
-
i just search seomoz tooll
it say duplicate content for
and
should i use canonical url for this ?
is yes then
is this right ?
-
Yeah, I think canonical is fine for "index.php" variants. One important addition, though. Check your internal link structure. Many sites link to "index.php" via their "Home" link or logo. I'd suggest changing that to an absolute URL or just "/". That way, you're not creating the non-canonical version in the first place.
-
thats why i said the bit about using non-www in htaccess too
-
no trailing slash where you've got say .php or .html at the end
-
I mean canonical is not a bad idea but my suggestion was to use 301 redirection from all different forms of domain URL to your prefered version so that all juice that you have on different URLs can transfer to the preferred version and at the same time visitors also redirect to the URL version you want....
-
-
In addition to those 301 rules stick this in your htacess file
DirectoryIndex index.php index.html site-down.php
it tells the browser and bots which page is the default for your folders and root.
Also ensure your non-www forward to www. using this code
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] -
This is a great question. Yes, you should use a canonical tag. But, I would suggest that your canonical tag needs to be:
Notice the addition of the '/"
THe, I would also make sure that these URLs produce 301 status codes when going through your server:
This is very important so as not to fragment your link profile and also not to produce massive amounts (potentially) of duplicate content in Google and other search engines.
Hope that helps!
Dana
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
-
Which URL should I choose when combining content?
I am combining content from two similar articles into one. URL 1 has a featured snippet and better URL structure, but only 5,000 page views in the last 6 month, and has 39 keywords ranking in the top 10. URL 2 has worse structure, but over 100k page views in the last 6 months, and 236 keywords in the top 10. Basically, I'm wondering if I keep the one with the better URL structure or the one with more traffic. The deleted URL will be redirected to whichever I keep.
Intermediate & Advanced SEO | | curtis-yakketyyak0 -
Crawl Test Question
Good Morning, I am just looking for a little bit of advice, I ran a crawl report on our website www.swiftcomm.co.uk. I have resolved most of the issues myself, however I have two questions;- Screenshot image http://imgur.com/VlFEiZ2 Highlighted blue, we have two homepages www.swiftcomm.co.uk and www.swiftcomm.co.uk/ both are set with a Rel-Canonical Target of www.swiftcomm.co.uk/. Will this cause me any SEO issues and or other potential issue? If this may cause an issue how would I go about resolving? Highlighted yellow, Our contact and referral-form are showing as duplicate title and meta description. Both of these pages have separate title and meta desc which it does seem to be detecting. If I search the page in google it returns the correct title and meta desc. The only common denominator behind these pages is that both have php pages behind them for the contact form. Do you think that the moz crawl may be detecting the php page over the html? Could this be cause any issues when search engines crawl the site? Kind Regards Jonathan Mack VlFEiZ2
Intermediate & Advanced SEO | | JMack9860 -
SEO question
Hi there! I'm the SEO manager for 5 Star Loans. I have 2 city pages running. We are running our business in 2 locations: Berkeley, CA & San Jose, CA. For those offices we've created 2 google listings with separate gmail accounts. Berkeley (http://5starloans.com/berkeley/) ranks well in Berkeley in Gmaps and it shows on first page in organic results. However the second city page San Jose (http://5starloans.com/san-jose/) doesn't show in the Gmaps local pack results and also doesn't rank well in organic results. Both of them have authentic backlinks and reviews. It has been a year already and it's high time we knew the problem 🙂 any comment would be helpful. thanks a lot
Intermediate & Advanced SEO | | moonalev0 -
URL Injection Hack - What to do with spammy URLs that keep appearing in Google's index?
A website was hacked (URL injection) but the malicious code has been cleaned up and removed from all pages. However, whenever we run a site:domain.com in Google, we keep finding more spammy URLs from the hack. They all lead to a 404 error page since the hack was cleaned up in the code. We have been using the Google WMT Remove URLs tool to have these spammy URLs removed from Google's index but new URLs keep appearing every day. We looked at the cache dates on these URLs and they are vary in dates but none are recent and most are from a month ago when the initial hack occurred. My question is...should we continue to check the index every day and keep submitting these URLs to be removed manually? Or since they all lead to a 404 page will Google eventually remove these spammy URLs from the index automatically? Thanks in advance Moz community for your feedback.
Intermediate & Advanced SEO | | peteboyd0 -
Rel Canonical attribute order
So the position of the attribute effect the rel canonical tags' ability to function? is the way I see it across multiple documents and websites. Having a discussion with someone in the office and there is a website with it set up as: Will that cause any problems? The website is inquestion still has both pages indexed within Google using the SITE:domain.com/product as well as SITE:domain.com/category/product
Intermediate & Advanced SEO | | jasondexter0 -
Google Places - Advanced Question
Hi All, Ive found multiple threads about previous issues but I haven't found any tailored to my specific question.I know there are a large amount of factors so I wanted to see if any other individuals had ran into this previously. We are currently in a centralized position in a major city. We are discussing moving the main office about 15 miles away into another city, moving us out of the main city where we have been for the past 3 years. The city where we are currently located has a lot more GEO search volume compared to the new city search terms and variants of. If we move will our local rankings drop when someone searches in the city where we were previously? How long would it take for this ranking to fall? Or would we still rank because we are moving a short distance away and have a large amount of citations there? I know we would need to change over all our online directories, on page etc..Any other suggestions on a smooth transition? I know there are many factors that go into this and any past experience, guidance and/or assistance is greatly appreciated. Cheers!
Intermediate & Advanced SEO | | PRKEL0 -
Domain and Sitemap Question
Hi - I am hoping you can help me with this issue we are currently trying to solve. We are hosting our mobile site's content on a different domain than what the URL of the site is, though owned by same company. In Google Webmasters tool we have the mobile sitemap under "sitemaps.xyz.com", however the URL of the site is "m.xyz.com". We have submitted 60MM pages in the mobile sitemap, but only 1MM pages have been indexed. Do you think this set up causes confusion with the bots? Does this affect the crawlability of the site? Any thoughts would be greatly appreciated. Thank you!
Intermediate & Advanced SEO | | ladylana
Eva0 -
Optimal URLs for SEO and UX
We are considering restructuring the URL scheme on one of the websites we maintain. We have a few options. Currently news article URLs are as follows:
Intermediate & Advanced SEO | | Peter264
http://domain.com/news/1234/article-title-name/ Download section URLs are as follows:
http://domain.com/downloads/files/1234/file-title-of-download-here/ Forum URLS:
http://forum.domain.com/forum/topic/1234/title-of-forum-topic-here/ We feel that these are a bit too long for both SEO and user experience. We want to remove as many directories from the URLs as possible. From experience, what do you recommend changing for the example URLs above? We have some ideas below...and we need to keep the ID in the URLs...however I know this is a little frustrating. Some ideas we have for news articles:
http://domain.com/news/article-title-shorter-1234
http://domain.com/article-title-shorter-n1234 Some ideas for the download pages:
http://domain.com/downloads/file-title-shorter-d1234
http://domain.com/downloads/files/file-title-shorter-1234
http://domain.com/file-title-shorter-d1234 Some ideas for the forum URLs:
http://forum.domain.com/topic-title-shorter-t1234
http://forum.domain.com/topic/topic-title-shorter-1234 What do you think of these suggestions? Any other URL ideas? Recommended URL length? The purpose of is question was to find the perfect URLs for the site we are working on; your thoughts, suggestions and tips are very much appreciated.0