1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why does my website create strange URL's?

Discussion in 'White Hat SEO' started by xtopzi, Jun 3, 2013.

  1. xtopzi

    xtopzi Regular Member

    Joined:
    Sep 28, 2010
    Messages:
    291
    Likes Received:
    205
    Google has only indexed 2 pages as its set to noindex atm (testing). But one of the indexed pages is mysite.com/?p=11 which is a 'copy' of the mainpage. No matter what number you put after "=" a copy of the mainpage pops up. To keep things nice and clean, how do I get rid of this? I tried redirecting /? but that crashes (too many redirects).

    Website built in pure HTML so no CMS. Suggestions welcome.
     
  2. Endire

    Endire Elite Member Premium Member

    Joined:
    Mar 27, 2012
    Messages:
    1,756
    Likes Received:
    1,061
    Gender:
    Male
    Xtopzi,

    Have you tried redirecting via .htaccess using the whole URI? For example something like this,

    Redirect 301 /?p=11 http://www.yoursite.com

    That should work (assuming your server supports the use of .htaccess).

    Best,

    Shawn
     
  3. Endire

    Endire Elite Member Premium Member

    Joined:
    Mar 27, 2012
    Messages:
    1,756
    Likes Received:
    1,061
    Gender:
    Male
  4. pavan

    pavan Elite Member

    Joined:
    Mar 30, 2008
    Messages:
    1,603
    Likes Received:
    432
    its a main page only
    its similar to
    mysite .com / index.php?p= xx
    no matter what you replace in xx your main page will be displayed
    its simply a php token
    even if you replace p with some other letter it wont change anything
    it got indexed because there must be some link on your site to that page
    if you remove the index page from google then it should resolve your problem
     
  5. xtopzi

    xtopzi Regular Member

    Joined:
    Sep 28, 2010
    Messages:
    291
    Likes Received:
    205
    Hey Shawn, thanks for your reply. I can redirect the odd URL sure but like I said, it doesn't matter what you type in there it all redirects to my main page. How Google got that URL I have no idea, I've never linked to anything in that fashion.

    When my website goes live and I remove the robots line, Google should be doing a new crawl at some point and hopefully remove the URL from its index.

    Perhaps some sort of tagging script came with this HTML template? Still odd.
     
    Last edited: Jun 3, 2013
  6. pavan

    pavan Elite Member

    Joined:
    Mar 30, 2008
    Messages:
    1,603
    Likes Received:
    432
    google will index new pages at some point but it might not remove already indexed url if it still exists
    however you can try to block google from indexing that particular url using robots.txt with wildcards?

    something like
    User-Agent: *
    Disallow:
    Disallow: /index.php?

    am not sure but it might even remove the index.php from the index