Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

My shares and stock market analysis an advisory website has canonical URL problems. My web server is not able to resolve this issue for now using htaccess or any other means and all my SEO efforts are getting wasted. Perhaps I am not so sure but this is one issue which is there since launch of my website at least since last three years. So I just want to sort this out to make sure at least conical URL issue is not hampering my traffic flow. I tried html meta code <meta http-equiv="refresh" content="0; url=http://www.takemyview.co.in/"> in index file but since this is the same URL which is having conical issue it getting refreshed on every reload and hence is not a good solution. If the browser stop after one refresh or if the browser get redirection only if user get to my website using http://takemyview.co.in or takemyview.co.in or takemyview.co.in/index.html to unique URL

Please give me immediate solution on this be kind

share|improve this question
    
The site seems okay to me, what canonical url problem are you experiencing? What is the issue you are trying to fix? also the meta code you posted appears to have broken, can you edit? –  CodeMonkey Apr 19 '13 at 9:24
    
Thanks for replying I found my site getting indexed separately for URL one starting with www and other without www which is concerning factor my web hosting support require htacceess as my coding is in plain html and not in php and that two users has to provide the required code now I have provided them two codes which failed to provide results I requested them to fix this error but they responded saying that they can't generate code for client –  MANJIRI MULEY Apr 19 '13 at 9:39
    
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.takemyview\.co.in [NC] RewriteRule ^(.*)$ takemyview..co.in/$1 [R=301,L] will this be ok? –  MANJIRI MULEY Apr 19 '13 at 9:57
    
Now the issue is fixed I think by back end team of Yahoo! small business Thanks to them –  MANJIRI MULEY Apr 19 '13 at 10:31

1 Answer 1

If your webserver is apache, you can use the technique from here: http://stackoverflow.com/questions/6059920/removing-index-html-from-url-and-adding-www-with-one-single-301-redirect

In order to remove index.html or index.htm from URLs I use the following in my .htaccess

RewriteCond %{REQUEST_URI} /index\.html?$ [NC]
RewriteRule ^(.*)index\.html?$ "/$1" [NC,R=301,NE,L]

If your webserver is ngnix, you can try the solutions here: http://stackoverflow.com/questions/5675743/nginx-rewrite-rule-to-remove-index-html-from-the-request-uri

If you webserver is IIS, try the solution here: http://stackoverflow.com/questions/7057639/iis7-url-rewrite-rule-to-perform-a-301-redirect-from-html-files-to-php-files


Alternately, you can add a rel canonical meta tag to the <head> of your index.html file:

<link rel="canonical" href="http://takemyview.co.in/"/>

which will allow Google to crawl both versions, but tell it to index only the version without the index.html.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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