Rel canonical or 301 the Index Page?
-
Still a bit confused on best practice for /index.php showing up as duplicate for www.mysite.com. What do I need to do and How?
-
Hi! I'm following up on older questions, and wondering if you got this straightened out or still need a hand. Thanks!
-
I would recommend Barry's original solution as not only does it fix the issue you mentioned, it takes care of a couple of other potential duplicate content issues (slashes elsewhere and www vs non-www)
Marcus's solution should be fine if want to fix the one issue on the single page.mentioned.
-
You do get small variations in how the server wants the htaccess but give it a go and see if it works.
If you are happy it is working in the browser then there is a free bit of software called webbug that will let you see the HTTP headers to ensure you are getting the 301 permanent redirect returned.
Hope it helps.
-
Theoretically should work; you can quickly try it to see and change it back if it doesn't work
Doing it your way I've had sites fall over a few times (white page of death), but changing it back fixes things in no time.
-
so just adding this in should work too right?
redirect 301 /index.php http://www.mysite.com/
I have this already:
RewriteCond %{HTTP_HOST} ^mysite.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301] -
Probably the simplest way is to put this in your .htaccess file
RewriteEngine On Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.example.com/$1 [R=301,L]RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.example.com/$1 [R=301,L]For reference the .htaccess file goes in the root of your domain via whatever file transfer program you use and of course replace example.com with your domain
This also makes sure the non-www redirects to the www.
If you get stuck, let me know
-
Add a canonical URL of www.mysite.com to the homepage (/ & /index.php) & 301 redirect www.mysite.com/index.php to www.mysite.com
That covers both bases and will see the content indexed on the correct page before too long.
Cheers
Marcus
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
-
To 301 or not to 301?
So, to cut a long story short, on our website we have a /product page that is very similar to our homepage and doesn't really serve much of a purpose. It doesn't really fit in with the rest of the website and our directors want to get rid of it and focus our efforts on our homepage. Problem is, the /product page has a little bit of PA and links to other important pages on the website. I personally don't want to completely cut this page off. Would a 301 redirect to the homepage be a good option or would I be better off redirecting users to our course library page (Our course pages are what bring in most of our organic traffic)? Any help or other suggestions would be appreciated here! http://www.ihasco.co.uk/
Technical SEO | | iHasco1 -
Do URLs with canonical tags get indexed by Google?
Hi, we re-branded and launched a new website in February 2016. In June we saw a steep drop in the number of URLs indexed, and there have continued to be smaller dips since. We started an account with Moz and found several thousand high priority crawl errors for duplicate pages and have since fixed those with canonical tags. However, we are still seeing the number of URLs indexed drop. Do URLs with canonical tags get indexed by Google? I can't seem to find a definitive answer on this. A good portion of our URLs have canonical tags because they are just events with different dates, but otherwise the content of the page is the same.
Technical SEO | | zasite0 -
Should I keep writing about the same using rel canonical?
Hi, The service we provide has not so many searches per month. A long tail keyword that describes the service well has at the most 400 searches per month. We wrote a post for this keyword and we ranked number 1 for many months. Now we're on page 2 and I the truth is we stopped writing blog posts because we were raking well for our best keywords. I added a few new posts and lost ranking on my top keywords so I gave up, deleted them and recover the rankings for the keywords I wanted the most. The problem is that I have lost these positions and I know we're supposed to be updating the blog regularly. What would you suggest? Should we keep writing about the same thing and use rel canonical? There aren't that many keywords related to what we offer. I appreciate any ideas.
Technical SEO | | Naix0 -
Page disappeared from Google index. Google cache shows page is being redirected.
My URL is: http://shop.nordstrom.com/c/converse Hi. The week before last, my top Converse page went missing from the Google index. When I "fetch as Googlebot" I am able to get the page and "submit" it to the index. I have done this several times and still cannot get the page to show up. When I look at the Google cache of the page, it comes up with a different page. http://webcache.googleusercontent.com/search?q=cache:http://shop.nordstrom.com/c/converse shows: http://shop.nordstrom.com/c/pop-in-olivia-kim Back story: As far as I know we have never redirected the Converse page to the Pop-In page. However the reverse may be true. We ran a Converse based Pop-In campaign but that used the Converse page and not the regular Pop-In page. Though the page comes back with a 200 status, it looks like Google thinks the page is being redirected. We were ranking #4 for "converse" - monthly searches = 550,000. My SEO traffic for the page has tanked since it has gone missing. Any help would be much appreciated. Stephan
Technical SEO | | shop.nordstrom0 -
Why is this page not ranking but is indexed?
I have a page http://jobs.hays.co.uk/jobs-in-norfolk and it is indexed by Google but will not show up for any keywords I try. Any ideas?
Technical SEO | | S_Curtis0 -
Combining 2 blogs into one. What is quicker, easier and better - rel canonical or an htaccess/ 301?
The objective I have is to archive an entire blog (which I no longer have time to keep up) with multiple posts over 4years , into another blog as a a folder. My question: would it be quicker and easier to do a rel canonical, or separately list all pages in htaccess and do a 301 redirect.
Technical SEO | | charlesgrimm0 -
I know I'm missing pages with my page level 301 re-directs. What can I do?
I am implementing page level re-directs for a large site but I know that I will inevitably miss some pages. Is there an additional safety net root level re-direct that I can use to catch these pages and send them to the homepage?
Technical SEO | | VMLYRDiscoverability0 -
Canonical tags pointing at old URLs that have been 301'd
I have a site which has various white label sites with the same content on each. I have canonical tags on the white label sites pointing to the main site. I have changed some URLs on the main site and 301'd the previous URL to the new ones. Is it ok to have the canonicals pointing to the old URLs that now have a 301 redirect on them.
Technical SEO | | BeattieGroup0