ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Google Analytics - duplicate URLs - SEO

August 21, 2008 6:00am

Subscribe [4]
  • #1 / Aug 21, 2008 6:00am

    iseem

    41 posts

    I have a new EE site where I’ve renamed the main index.php file to ‘site’, and I’m using .htaccess to make ‘site’ the default directory index. Problem is Google is appending ‘/site’ to ALL my URLs. So my pages are showing up twice in Analytics, like so:

    http://www.mysite.com/site/template_group/template
    http://www.mysite.com/site/template_group/template/site

    I’m concerned about the SEO impact if Google is seeing these as 2 pages with duplicate content instead of only one page. Plus it’s messing up my statistics. Anyone seen this before? Any advice? We haven’t been fully crawled yet and I really need to solve this before Googlebot comes around!

    Thanks!

  • #2 / Aug 21, 2008 9:32am

    Ingmar

    29245 posts

    Do you’ve got a link to the site? Can you paste the content of your .htaccess file? Also, what version and build are you on?

  • #3 / Aug 21, 2008 11:56pm

    iseem

    41 posts

    Do you’ve got a link to the site?

    http://www.tsca.edu

    what version and build are you on?

    1.6.4 Build: 20080710

    Can you paste the content of your .htaccess file?

    ...edit…
  • #4 / Aug 22, 2008 3:07am

    Ingmar

    29245 posts

    Could it be that there is a relative link somewhere, linking to “./site” or “site” instead of “/site”? That would explain why it’s only “tacked on”. As a rule, Google does not make up links.

    If that doesn’t work, try disabling your rewrite, see if that’s the issue.

  • #5 / Aug 22, 2008 5:12am

    iseem

    41 posts

    Okay, I believe I’ve resolved the issue, though I still don’t know why the problem was occurring.

    What I did was to change the first part of the DirectoryIndex directive from

    DirectoryIndex site index.php

    to

    DirectoryIndex index.php site

    Since index.php doesn’t exist in my root directory the directive still works for my home page. My Analytics data just came on line, and since the change the unwanted ‘/site’ is gone.

    My hypothesis was that the .htaccess directive was being applied recursively through all subdirectories, and since EE URLs look like directories, Apache would redirect all EE URLs to “URL/site”. Since EE will show the correct template even when there’s an unnecessary final URL segment, the proper page loaded anyway. And since the directory index doesn’t show in the address bar there’s no way to know it’s happening. However, I just switched the directive back to the old way and looked at my HTTP headers, and I don’t see any evidence to support my theory. So maybe I just got lucky!

    Anyway, thanks for the help Ingmar.

  • #6 / Aug 22, 2008 11:37am

    Sue Crocker

    26054 posts

    iseem, it looks like things are working like they should.

    Closing the thread, please feel free to open another if needed.

  • #7 / Aug 22, 2008 11:38am

    Sue Crocker

    26054 posts

    Now really closing it. 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases