is mydomain.com and mydomain.com/index.php the same?

9 replies
  • SEO
  • |
is mydomain.com and mydomain.com/index.php the same?

I see them listed separately on my sitemap?
If yes, will Google treat it as duplicated content?

Thanks
#mydomaincom #mydomaincom or indexphp
  • Profile picture of the author dadamson
    Originally Posted by PrincessJasmine View Post

    is mydomain.com and mydomain.com/index.php the same?

    I see them listed separately on my sitemap?
    If yes, will Google treat it as duplicated content?

    Thanks
    Yes, they are different pages if both URLs exist and you have not 301 redirected them.

    Just like www.mydomain.com and mydomain.com are different pages until you add a 301 redirect.
    {{ DiscussionBoard.errors[5143251].message }}
    • Profile picture of the author PrincessJasmine
      Originally Posted by dadamson View Post

      Yes, they are different pages if both URLs exist and you have not 301 redirected them.

      Just like www.mydomain.com and mydomain.com are different pages until you add a 301 redirect.
      Ahh I see
      What should I do at this point?
      Who should I redirect?
      {{ DiscussionBoard.errors[5143357].message }}
  • {{ DiscussionBoard.errors[5143453].message }}
    • Profile picture of the author PrincessJasmine
      Originally Posted by UMS View Post

      When you go you your main domain, does it redirect to index.php?
      No, it doesnt.
      {{ DiscussionBoard.errors[5143734].message }}
  • Profile picture of the author Microsys
    I would redirect index.php to your website domain root. Always try minimize duplicate URLs. (This also helps focus the backlink juice instead of spreading it out.)

    That said, the sitemappper tool should be able to automatically figure out that the index.php URL most likely is a duplicate. (Infact otherwise Google Webmaster Tools will often in similar cases issue warnings about URLs GWT thinks may be duplicates.)
    {{ DiscussionBoard.errors[5147555].message }}
  • Profile picture of the author PrincessJasmine
    Update:

    I just tried using 301 redirect on my index.php page to my domain.
    Placed the following code on my index.php

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.mydomain.com" );
    ?>

    I then tried accessing website immediately after, and received an error message
    "redirect issue: loop" (or something like that).

    I am wondering if I did anything wrong here?
    From my understanding, I didnt really created any loop, and was trying to redirect index.php to my website domain root.

    I am very confused here. Please help. Thanks!
    {{ DiscussionBoard.errors[5216807].message }}
    • Profile picture of the author paulgl
      They are not different pages, they are the same thing.

      99.9999999999999999999% of people with website
      do not have to worry about a thing. Many servers
      can have multiple urls going to the main index page.
      domain.com, www .domain.com, www .domain.com/,
      domain.com/, etc. etc. etc.

      It's no big deal. Google is smart enough to judge which
      version to show in SERPs. It doesn't even matter if you
      make backlinks with any range of them. You don't
      really need to 301 anything, but it makes webmasters
      feelgood.

      Does it "look" like multiple pages to "google"?
      Yes, but not in the sense that people should panic
      about a thing.

      If your server is set up so that index.php is where
      people go to when typing in domain.com. like warriorforum.com,
      then it matters not. It's the same friggin' page.

      And if your server is set up for index.php to indeed be
      where the visitor goes, then you are actually at
      domain.com/index.php even though the browser just
      shows domain.com.

      This is just something in the past that used to make
      webmasters panic after hearing google thinks it's
      a different page. It does not matter one iota.

      What would matter is if people typed in domain.com
      and it went nowhere. Then that would be a server
      issue that can be solved very easily. The flip side
      is true as well. Some servers do not know what to
      do with www .domain.com. Luckily, must servers go
      to the index page no matter what a person types.

      But getting to same page on multiple urls DOES NOT
      mean there are multiple pages, and google is smart
      enough to know that. In fact, the point is beyond
      being moot in 2012.

      Paul
      Signature

      If you were disappointed in your results today, lower your standards tomorrow.

      {{ DiscussionBoard.errors[5217080].message }}
      • Profile picture of the author Crank
        What if people put links to your www. domain.com, domain.com, domain.com/index.php - which page get the link juice? each from the list? in this case it's reasonable to add a 301 redirect.
        {{ DiscussionBoard.errors[5309532].message }}
        • Profile picture of the author thecableguy
          The index page is the default page for the folder. In other words if no specific page url is entered it will default to the index file.

          For instance type in google.com or google.com/index.html and it's the same page, it's just defaulting to the index file. If you create subdomains or subfolders you should put an index file in there even if you don't have any readable files in there or depending on your server they could have access to all the files in the folder.

          If it's not redirecting to index.php you don't have anything to worry about. Since there are different file extensions php, html, htm, asp, pdf, etc I doubt anyone would enter or link to index.php or whatever, it would be minimal at most. And besides it's the same page. As for the www and non www version link to one and create a redirect for the other.
          {{ DiscussionBoard.errors[5309628].message }}

Trending Topics