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

Wordpress permalink structure

Discussion in 'Black Hat SEO' started by myopic1, Feb 21, 2015.

  1. myopic1

    myopic1 Regular Member

    Joined:
    Mar 24, 2014
    Messages:
    408
    Likes Received:
    402
    I'm having an interesting duplicate content issue with a Wordpress blog that I've never encountered before, as a result of it I've basically over-optimised anchor text going to a money site, so I'm wondering if anyone else has seen this issue before.

    The issue is that I'm getting duplicate homepage pages because pages with the url "mysite.com/?c=1" exist where the number after "c=" ranges from 1 to almost 100.

    I know that typically Wordpress without custom permalinks activated uses a "mysite.com/?p=1" extension but this is something different. Does anyone know how to prevent the creation of these pages or what the "c" stands for? I assumed it was short for "category" however I have all category pages noindexed to prevent the duplicate content issue that I'm now faced with.

    Cheers.
     
  2. tiyowan

    tiyowan Regular Member

    Joined:
    Aug 7, 2013
    Messages:
    250
    Likes Received:
    136
    Strange. First, do a mass search in your wordpress folder using a text
    editor for "?c=1" or its variations. Once you are able to trace where
    these URLs are being handled then you will be in a better position to
    debug this.
     
    • Thanks Thanks x 1
  3. myopic1

    myopic1 Regular Member

    Joined:
    Mar 24, 2014
    Messages:
    408
    Likes Received:
    402
    Not following on how to do the search, how are you suggesting to open a folder with a text editor? Is there a specific file that you mean?
     
  4. myopic1

    myopic1 Regular Member

    Joined:
    Mar 24, 2014
    Messages:
    408
    Likes Received:
    402
    Okay I've come up with a custom solution to this bizarre problem that got me penguin slapped for the first time ever...

    I uncovered this issue via Majestic which showed a massive amount of backlinks from one of my PBN sites, the solution is to alter your .htaccess file with a clever little rule that will redirect any URLs that contain 'c=' to your root domain...

    RedirectMatch 301 ^(.*?/)c=(.*)$ $1$2

    This trick will also work for other purposes and redirects by replacing the 'c=' part.
     
  5. tiyowan

    tiyowan Regular Member

    Joined:
    Aug 7, 2013
    Messages:
    250
    Likes Received:
    136
    Use Sublime Text. As for the .htaccess, that will work fine, but if I were
    you, I'd really try to find out just exactly -why- your WP install is set up
    to handle ?=c links.

    It could be a plugin or more worryingly, malicious code. Sorry if I seem
    paranoid but it's always better to be safe rather than sorry when it comes
    to WP sites.

    If you're not a PHP programmer, don't worry about it. But I would still get
    a friend who is to take a look at it if you can.
     
    • Thanks Thanks x 1
  6. myopic1

    myopic1 Regular Member

    Joined:
    Mar 24, 2014
    Messages:
    408
    Likes Received:
    402
    Thanks for the help, appreciate it! You're right, I should find out why to prevent this happening again, I'm wondering whether it's theme related or more troublingly malicious as you point out, I've used the exact set-up across every other PBN site with no trouble. I'm not a PHP guy, Python is my thing but I get by with PHP code. I couldn't find anything database related anyway.
     
  7. tiyowan

    tiyowan Regular Member

    Joined:
    Aug 7, 2013
    Messages:
    250
    Likes Received:
    136
    No worries. Cool, if Python is your thing you should be able to nail PHP
    down pretty quickly. I really envy you Python bastids because of the
    cleaner syntax and also because I've seen a lot less worse Python code
    than I have PHP code.

    Something you could try real quick if you have a local copy is:

    1. Change to default theme and check whether ?c= links are handled.
    2. Deactivate all plugins one by one and do the same check.

    Wouldn't hurt to do a sanity test by check whether a fresh WP install
    is to set up to handle ?c= links. I can't remember off the top of my
    head right now.

    Anyway, good luck - if you need anything, drop me a PM.
     
  8. myopic1

    myopic1 Regular Member

    Joined:
    Mar 24, 2014
    Messages:
    408
    Likes Received:
    402
    Haha yes, my love of Python knows no bounds my custom web-crawler is humming away nicely ;)

    Yes I changed the theme and discovered something interesting, any Wordpress site will handle that url addition. try yoursite.com/?c=1 and it should give you a result. So whatever it is, it's Wordpress related, as to why mine became suddenly indexable I really don't know.

    Thanks, will do!