Need some help with some intentional 404s.

by
LakiPolitis
Profile picture of LakiPolitis
Posts: Threads: Thanks: Account age: less than a second
19 replies
Here's the problem. Affiliate of ours started spamming his link everywhere. Now, these spammy website all point to my domain's default page with this affiliate id parameter attached. Until I started doing SEO for this site, google was indexing these parameters... now his affiliate link (with parameter) is posted on these damn spam sites and they're posting to my domain.

I'm 100% convinced its negatively affecting my domain trust and authority. How can quickly, and effectively, send them to a 404 before my server returns anything. (Right now, I've 301ed everything with the affid parameter to a page that I intentionally haven't made so it hits a 404 - which is a pretty useful 404 page).

Any other ideas?
#404s #intentional #seo #server response codes
  • Profile picture of the author michael_gourlay
    michael_gourlay
    Profile picture of michael_gourlay
    Posts: Threads: Thanks: Account age: less than a second
    What programming language are you using?
  • Profile picture of the author dudeontheweb
    dudeontheweb
    Profile picture of dudeontheweb
    Posts: Threads: Thanks: Account age: less than a second
    I would say you could do it in .htaccess with mod_rewrite, but I assume you are on a MS server. No clue about that. Sorry.
    Signature

    Need a QR Code? Check out my QR Code Generator. It's FREE!

  • Profile picture of the author michael_gourlay
    michael_gourlay
    Profile picture of michael_gourlay
    Posts: Threads: Thanks: Account age: less than a second
    I don't really know any ASP.NET or VB.NET, but this may help.

    How to cause a 404 from code ?
  • Profile picture of the author ussher
    ussher
    Profile picture of ussher
    Posts: Threads: Thanks: Account age: less than a second
    Seams to me your attacking the problem too late in the cycle.

    Is the affiliate script yours? can you alter it? if so add a function to 'ban' certain affiliate id's with an exception to decide which page banned id's come up on.

    Since I dont know exactly how your affiliate system works, ill take a guess. The affiliate link is clicked on which comes into your site, the affiliate id is recorded into the database and your user is redirected to the default page.

    Its there between the recording and redirect where you could check and just not send anybody coming in on that link ID to your site.

    If the affiliate id is not being picked up until the visitor lands on the page then its open for tampering with and i'd recommend a different affiliate script.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
  • Profile picture of the author LakiPolitis
    LakiPolitis
    Profile picture of LakiPolitis
    Posts: Threads: Thanks: Account age: less than a second
    Yeah, dudeontheweb, definitely on MS servers.

    ussher, thanks for you post. What I'm doing right now is:

    you come in with the link: ~ areweonline.com/?affid=90898 for example.

    When the master page loads up, it checks for your link in the code-behind. If the affid is present, or contains a number it simply sends you to a page that does not exist. Then ASP.net web.config customerrors drops you off at my custom 404 page.

    ~ areweonline.com/deadlink.aspx - which brings up my 404 page. To correct ASP.net for some reason returning a 200 when getting to this custom page, I've programmatically set it to pop a 404. It looks like I'm getting the results I want in Google Webmaster Tools. New pages are showing up with 404 errors, and they all have the affid query string.
  • Profile picture of the author SteveJohnson
    SteveJohnson
    Profile picture of SteveJohnson
    Posts: Threads: Thanks: Account age: less than a second
    You're catching the aff link way too late for the 404 to do any good. Here's your sequence (I removed all the extra header info for clarity):
    Code:
    http://areweonline.com/?affid=90898
    
    (1)
    Request: GET /?affid=90898 HTTP/1.1
    Response: HTTP/1.1 301 Moved Permanently to: 
    Location: http://www.areweonline.com/default.aspx?affid=90898
    ----------------------------------------------------------
    (2)
    Request: GET /default.aspx?affid=90898 HTTP/1.1
    Response: HTTP/1.1 301 Moved Permanently to: 
    Location: http://www.areweonline.com/deadlink.aspx
    ----------------------------------------------------------
    (3)
    Request: GET /deadlink.aspx HTTP/1.1
    Response: HTTP/1.1 302 Found
    Redirect to: Location: /404.aspx?aspxerrorpath=/deadlink.aspx
    ----------------------------------------------------------
    (4)
    Request: GET /404.aspx?aspxerrorpath=/deadlink.aspx HTTP/1.1
    Response: HTTP/1.1 404 Not Found
    ----------------------------------------------------------
    So in reality, you're telling the browser ( or Google ) that the 404.aspx page is Not Found. Not really what you're trying to accomplish.

    Instead of request (2) returning 301 to deadlink.aspx, you need to return the 404 at that point and then show your custom 404 page.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

  • Profile picture of the author LakiPolitis
    LakiPolitis
    Profile picture of LakiPolitis
    Posts: Threads: Thanks: Account age: less than a second
    The thing is that that page does exist. Default.aspx?aspjda=123123 technically exists. So how do I stop a page that exists from showing anything other than a 200?

    Don't you want your 404 page to show a 404 error? If the 404 didn't have the response code 404 it would have a 200 which would start getting my 404 page indexed.
    • Profile picture of the author SteveJohnson
      SteveJohnson
      Profile picture of SteveJohnson
      Posts: Threads: Thanks: Account age: less than a second
      Originally Posted by LakiPolitis View Post

      The thing is that that page does exist. Default.aspx?aspjda=123123 technically exists. So how do I stop a page that exists from showing anything other than a 200?

      Don't you want your 404 page to show a 404 error? If the 404 didn't have the response code 404 it would have a 200 which would start getting my 404 page indexed.
      That address exists only if you allow it to exist. You have to determine early on - before your script returns any HTML - what to do with a request.

      The original request should return 404, and your server should serve your custom error page.

      You can find some more information on aspx 404s here: 301 404 Error Page Redirect for SEO - McAnerin International Inc.


      Another alternative is to 301 redirect those bad aff links to another address and not even worry about sending 404s, but have a 'noindex' on the destination page.
      Signature

      The 2nd Amendment, 1789 - The Original Homeland Security.

      Gun control means never having to say, "I missed you."

      • Profile picture of the author LakiPolitis
        LakiPolitis
        Profile picture of LakiPolitis
        Posts: Threads: Thanks: Account age: less than a second
        Originally Posted by SteveJohnson View Post

        Another alternative is to 301 redirect those bad aff links to another address and not even worry about sending 404s, but have a 'noindex' on the destination page.
        Until I get this affids removed from the google, bing, and yahoo indexes they need to hit 404s. This isn't a website I built, I'm going through and fixing things that are wrong. I've removed this query parameters in webmaster tools across the board as not affecting content so don't index them. But until they're removed I need to hit them with 404s.

        Thanks for the link, I'm checking into that.
  • Profile picture of the author kernelpaniker
    kernelpaniker
    Profile picture of kernelpaniker
    Posts: Threads: Thanks: Account age: less than a second
    I think Google may be smart enough to realize that its an affiliate link and not really penalize you. Maybe this will help you out (in the future) .

    Why cant you just cancel the affiliates account? That should null all their links.
  • Profile picture of the author Geekman
    Geekman
    Profile picture of Geekman
    Posts: Threads: Thanks: Account age: less than a second
    404 generally related to .htaccess and mod_rewrite. I think google is the best for solving your problem.
    • Profile picture of the author LakiPolitis
      LakiPolitis
      Profile picture of LakiPolitis
      Posts: Threads: Thanks: Account age: less than a second
      Originally Posted by Geekman View Post

      404 generally related to .htaccess and mod_rewrite. I think google is the best for solving your problem.
      I appreciate the effort in trying to help, Geekman. But I'm using an ASP.net IIS 6 MS Server. I don't have an .htaccess file. And mod_rewrite doesn't work for me either. Anyone wanna show me how to do an ISAPI rewrite before a server response code in IIS, and they get a thanks.

      On to the Google Webmaster video, I don't buy that for a goddamn second. We're told that getting links from spammy sites will mess up your ranking - if you do it. But if someone else posts you on spammy sites you won't get anything. Come on Google. You kiss your mother with that lying mouth? Spammy site links either hurt or they don't.
  • Profile picture of the author ussher
    ussher
    Profile picture of ussher
    Posts: Threads: Thanks: Account age: less than a second
    Why send them to a 404? You've obviously got the re-direct working correctly. If you dont want the customers or think they would not possibly benefit from staying on your site, throw em straight out.

    Instead of dropping them on your sites "404 nothing interesting to see here, please move along" page, Throw in your own affiliate link and send em off somewhere that might actually convert from the type of visitors that are coming in on that style of link.

    A quick common thought would be one of those horrible pages that contain nothing but adsense ads. Or somewhere else if you think they are targeted enough.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
  • Profile picture of the author LakiPolitis
    LakiPolitis
    Profile picture of LakiPolitis
    Posts: Threads: Thanks: Account age: less than a second
    Ussher, thanks for the advice. We built a 404 page that we're going to be doing some A/B testing on it. Right now it looks like this: http://www.areweonline.com/404.aspx

    What I'm trying to correct is search engine indexing of affids. Currently a bunch of search engines have this affiliate link indexed which means people aren't actually going to the guy's site and clicking the link, rather they can find it in a search engine and he's getting credit. Before I started working on the site, all of the Webmaster tools didn't remove the URL parameter affid, so some have it indexed.

    I need the search engines to remove the affid links from their index, without losing the default.aspx page. So if the URL has an affid I want it to hit a 404, so it gets removed, but I don't want to lose my default.aspx page.
  • Profile picture of the author ussher
    ussher
    Profile picture of ussher
    Posts: Threads: Thanks: Account age: less than a second
    Yeah marginal there. Guess it comes down to your affiliate programs terms and conditions.

    If I was the affiliate and I made the effort to get the search engines to include my link to your site in their results, I would want to be paid.

    Same as if I purchased a google adwords add and included my link to your site in the ad. The customer is coming directly to your site, but only because of the effort that I have made to put my link in front of them.

    However if the situation is someone puts in "Your Company Name" into search engine X and the result is:
    "Your Company Name" with the link as "http://your-company-name.com/?affid=123456"

    Then I can see how that would be undesirable.
    Signature

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    - jamroom.net
    Download Jamroom free: Download
  • Profile picture of the author lordspace
    lordspace
    Profile picture of lordspace
    Posts: Threads: Thanks: Account age: less than a second
    is it possible to get a new domain and send a notice to the affiliates to use the new domain. e.g. somenewdomain.com/?a=123 because the old ones will not work and they won't get paid.

    I think there was something like mod_rewrite but for IIS

    This shows how to import mod_rewrite rules in IIS
    Importing Apache mod_rewrite Rules : URL Rewrite Module : Installing and Configuring IIS 7 : The Official Microsoft IIS Site

    the article is for IIS 7, can you upgrade yours to IIS 7?
    Signature

    Are you using WordPress? Have you tried qSandbox yet?

  • Profile picture of the author LakiPolitis
    LakiPolitis
    Profile picture of LakiPolitis
    Posts: Threads: Thanks: Account age: less than a second
    Definitely going to check out the mod_rewrite thing on IIS.

    It maybe easier for us to do that. I'm just going to start giving affiliates subdomains, and it will be a more stringent approval process to become an affiliate.
  • Profile picture of the author LakiPolitis
    LakiPolitis
    Profile picture of LakiPolitis
    Posts: Threads: Thanks: Account age: less than a second
    IIS and ASP.net

Trending Topics