undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • MozCon

      Save on Early Bird tickets and join us in London or New York City

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

Browse the forum for helpful insights and fresh discussions about all things SEO.

  1. Home
  2. Research & Trends
  3. White Hat / Black Hat SEO
  4. Deny visitors by referrer in .htaccess to clean up spammy links?

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

Deny visitors by referrer in .htaccess to clean up spammy links?

White Hat / Black Hat SEO
3
4
2.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • highlyrelevant
    highlyrelevant last edited by May 15, 2012, 4:35 PM

    I want to lead off by saying that I do not recommend trying this. My gut tells me that this is a bad idea, but I want to start a conversation about why.

    Since penguin a few weeks ago, one of the most common topics of conversation in almost every SEO/Webmaster forum is "how to remove spammy links". As Ryan Kent pointed out, it is almost impossible to remove all of these links, as these webmasters and previous link builders rarely respond. This is particularly concerning given that he also points out that Google is very adamant that ALL of these links are removed.

    After a handful of sleepless nights and some research, I found out that you can block traffic from specific referring sites using your.htaccess file. My thinking is that by blocking traffic from the domains with the spammy links, you could prevent Google from crawling from those sites to yours, thus indicating that you do not want to take credit for the link.

    I think there are two parts to the conversation...

    1. Would this work? Google would still see the link on the offending domain, but by blocking that domain are you preventing any strength or penalty associated with that domain from impacting your site?

    2. If for whatever reason this would nto work, would a tweak in the algorithm by Google to allow this practice be beneficial to both Google and the SEO community? This would certainly save those of us tasked with cleaning up previous work by shoddy link builders a lot of time and allow us to focus on what Google wants in creating high quality sites.

    Thoughts?

    1 Reply Last reply Reply Quote 0
    • MickEdwards
      MickEdwards last edited by May 24, 2013, 3:40 PM May 24, 2013, 3:40 PM

      I've thought about this idea to get rid of bad links from specific referrers.

      I agree with the comments Ian has made but when it is the homepage it's not always possible to follow those steps.  Has anyone else had any experience/information?

      1 Reply Last reply Reply Quote 0
      • topic:timeago_earlier,about a year
      • highlyrelevant
        highlyrelevant @wrttnwrd last edited by May 15, 2012, 5:50 PM May 15, 2012, 5:50 PM

        Hi Ian,

        Thanks for the response. I agree with you that this feels wrong and I don't recommend anyone try this (unless you have a site that you don't mind using as a guinea pig).

        The problem is that, if this is your home page or a strong category page with many legitimate links, rankings, ect., it will be tough to abandon the page altogether.

        To follow up about the original idea, I have done some additional research and found a few mentions, though none of them exceptionally credible, of the fact that the Googlebot does not pass referrer data to the server. Can anyone confirm?

        1 Reply Last reply Reply Quote 0
        • wrttnwrd
          wrttnwrd last edited by May 15, 2012, 5:22 PM May 15, 2012, 5:22 PM

          Ooooh, that feels all wrong.

          Seems to me .htaccess would block visitors that you may want. And while Google may obey the directive, they may also misinterpret a referrer-specific directive as cloaking.

          If you want to get the same effect, here's what I'd do:

          1. Change the page to which the offending links point. Have it say "This page is gone, but you can get the information you want here" and make that a link to a new page.
          2. Set up your server to return a 410 code when folks visit that page.
          3. Set up a new page with the old page's content, so folks can click from the old to the new, but visiting bots and browsers get a 410 code and dump the page.

          That will get Google to de-index the page in a hurry.

          Another option: Simply add noindex, nofollow to the targeted page.

          But I like the 410 option, because that should break the authority flow and has the best chance of giving Google what it wants, short of removing the link.

          highlyrelevant 1 Reply Last reply May 15, 2012, 5:50 PM Reply Quote 2
          • 1 / 1
          1 out of 4
          • First post
            1/4
            Last post

          Got a burning SEO question?

          Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


          Start my free trial


          Browse Questions

          Explore more categories

          • Moz Tools

            Chat with the community about the Moz tools.

          • SEO Tactics

            Discuss the SEO process with fellow marketers

          • Community

            Discuss industry events, jobs, and news!

          • Digital Marketing

            Chat about tactics outside of SEO

          • Research & Trends

            Dive into research and trends in the search industry.

          • Support

            Connect on product support and feature requests.

          • See all categories

          Related Questions

          • AliMac26

            Spam Score & Redirecting Inbound Links

            Hi, I recently downloaded a spreadsheet of inbound links to my client sites and am trying to 301 redirect the ones that are formatted incorrectly or just bad links in general (they all link to the site domain, but they used to have differently formatted urls on their old site, or the link URL in general has strange stuff on it). My question is, should I even bother redirecting these links if their spam score is a little high (i.e. 20-40%)? it already links to the existing domain, just with a differently formatted URL. I just want to make sure it goes to a valid URL on the site, but I don't want to redirect to a valid URL if it's going to harm the client's SEO. Also not sure what to do about the links with the --% spam score. I really appreciate any input as I don't have a lot of experience with how to deal with spammy links.

            White Hat / Black Hat SEO | Jan 24, 2020, 1:36 AM | AliMac26
            0
          • NathalieBr

            Too many dofollow links = penalty?

            Hi. I currently have 150 backlinks, 90% of them are dofollow, while only 10% are nofollow. I recently hit position #10 for my main keyword, but now it is dropped to #16 and a lot of related keywords are gone. So I have a few questions: 1. Was my website penalized for having an unnatural backlink profile (too many dofollow links), or maybe this drop in positions is just a temporary, natural thing? 2. Isn’t it too late for making the backlink profile look more natural by building more nofollow backlinks and making it 50%/50%? Thank you!

            White Hat / Black Hat SEO | Oct 3, 2019, 12:37 AM | NathalieBr
            0
          • Boodreaux

            New Flurry of thousands of bad links from 3 Spammy websites. Disavow?

            I also discovered that a website www.prlog.ru put 32 links to my website.  It is a russian site.  It has a 32% spam score. Is that high? I think I need to disavow. Another spammy website link has spam score of 16% with with several thousand links. I added one link to the site medexplorer.com 6 years ago and it was fine. Now it has thousands of links. Should I disavow all three?

            White Hat / Black Hat SEO | Aug 9, 2018, 8:29 AM | Boodreaux
            0
          • crescentdigital

            Suspicious external links to site have 302 redirects

            Hi, I have been asked to look at a site where I suspect some questionable SEO work, particularly link building. The site does seem to be performing very poorly in Google since January 2014, although there are no messages in WMT. Using WMT, OPenSiteExplorer, Majestic & NetPeak, I have analysed inbound links and found a group of links which although are listed in WMT, etc appear to 302 redirect to a directory in China (therefore the actual linking domain is not visible). It looks like a crude type of link farm, but I cant understand why they would use 302s not 301s. The domains are not visible due to redirects. Should I request a disavow or ignore? The linking domains are listed below: http://www.basalts.cn/
            http://www.chinamarbles.com.cn/
            http://www.china-slate.com.cn/
            http://www.granitecountertop.com.cn/
            http://www.granite-exporter.com/
            http://www.sandstones.biz/
            http://www.stone-2.com/
            http://www.stonebuild.cn/
            http://www.stonecompany.com.cn/
            http://www.stonecontact.cn/
            http://www.stonecrate.com/
            http://www.stonedesk.com/
            http://www.stonedvd.com/
            http://www.stonepark.cn/
            http://www.stonetool.com.cn/
            http://www.stonewebsite.com/ Thanks Steve

            White Hat / Black Hat SEO | Jul 18, 2014, 10:12 AM | crescentdigital
            0
          • David-Kley

            Should You Link Back from Client's Website?

            We had a discussion in the office today, about if it can help or hurt you to link back to your site from one that you optimize, host, or manage. A few ideas that were mentioned: HURT:
            1. The website is not directly related to your niche, therefore Google will treat it as a link exchange or spammy link.
            2. Links back to you are often not surrounded by related text about your services, and looks out of place to users and Search Engines. HELP:
            1. On good (higher PR, reputable domain) domains, a link back can add authority, even if the site is not directly related to your services.
            2. Allows high ranking sites to show users who the provider is, potentially creating a new client, and a followed incoming link on anchor text you can choose. So, what do you think? Test results would be appreciated, as we are trying to get real data. Benefits and cons if you have an opinion.

            White Hat / Black Hat SEO | Nov 11, 2016, 1:07 PM | David-Kley
            2
          • zorsto

            Should I Do a Social Bookmarking Campaign and a Tier 2 Linking?

            I don't see anything bad in manually creating links on different (about 50) social bookmarking services. Is this method labeled as White Hat? I was wondering if it would be fine to create Tier 2 linking (probably blog comments) for indexing of the social bookmarking links? Please share your thoughts on the topic.

            White Hat / Black Hat SEO | Aug 9, 2013, 4:18 PM | zorsto
            0
          • Modi

            Pages linked with Spam been 301 redirected to 404\. Is it ok

            Pl suggest, some pages having some spam links pointed to those pages are been redirected to 404 error page (through 301 redirect) - as removing them manually was not possible due to part of core component of cms and many other coding issue, the only way as advised by developer was making 301 redirect to 404 page. Does by redirecting these pages to 404 page using 301 redirect, will nullify all negative or spam links pointing to them and eventually will remove the resulting spam impact on the site too. Many Thanks

            White Hat / Black Hat SEO | Nov 11, 2014, 8:55 PM | Modi
            0
          • Wilkerson

            Is it worth getting links from .blogspot.com and .wordpress.com?

            Our niche ecommerce site has only one thing going for it: We have numerous opportunities on a weekly basis to get reviews from "mom bloggers".  We need links - our domain authority is depressing.  My concern is that these "mom bloggers" tend to have blogs that end with .blogspot.com or .wordpress.com.  How do I screen for "reviewers" that are worth getting links from and how can I make the most of the community we have available to us?

            White Hat / Black Hat SEO | Aug 3, 2019, 4:28 AM | Wilkerson
            1

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy

          Looks like your connection to Moz was lost, please wait while we try to reconnect.