Deny visitors by referrer in .htaccess to clean up spammy links?
-
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...
-
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?
-
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?
-
-
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?
-
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?
-
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:
- 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.
- Set up your server to return a 410 code when folks visit that page.
- 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.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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.
Related Questions
-
Weird Links Should I Disavow?
I have noticed some weird backlinks in Google Search console and Referals for Google Analytics. For example a reddit page I have never commented on or been on has referred over 900 visitors. The page has no relevance to my site whatsoever, when I check the source code I cannot see the link, so perhaps its been removed. Also seeing links in Google Search Console from sites that are just domain name for sale type pages, and sites/pages that don't seem to exist anymore, or which redirect to others. All of these links have disappeared as well, nothing in source code . And numerous pages that used to link to 404's on my site, many domain name for sale type pages, another which makes my bitdefender plugin go crazy. And seeing common referral patterns in Google Analytics, i.e. numerous /try.php pages on different domains that presumably used to link back but which now redirect to another site. I cannot say there are thousands of these, but I guess they are causing more harm than good. My instinct is to I go through all the links I can and disavow, the link types described above, but am I safe to do so? And is it a good idea or a waste of my time? NB: I haven't built any of them.
White Hat / Black Hat SEO | | GrouchyKids1 -
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/
White Hat / Black Hat SEO | | crescentdigital
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 Steve0 -
Disavow links leading to 404
Looking at the link profile anchor text of a site i'm working on new links keep popping up in the reports with let's say very distasteful anchor text. These links are obviously spam and link to old forum pages for the site that doesn't exist any more, so the majority seem to trigger the 404 page. I understand that the 404 page (404 header response) does not flow any link power, or damage, but given the nature and volume of the sites linking to the "domain" would it be a good idea to completely disassociate and disavow these domains?
White Hat / Black Hat SEO | | MickEdwards0 -
Domain authority - Low quality links
I have a question I hope people can help me on. it is my intention for my next project to focus on domain authority, and a small number of high quality links. I have a couple of scenarios I would appreciate some advice on: 1. Can lower quality links lower domain authority? 2. Would you avoid links from low quality sites no matter what \ what domain authority levels should you avoid links from. 3. Should I be looking at link profiles of the sites I get links from. Does it matter if a site I get a link from has 1000's of spammy links (i.e. something to look out for when doing guest blogging). 4. Should I avoid directories no matter what, or is high pr \ domain authority directories ok to use, if I end up on a page of other relevant directory submissions related to my niche. Essentially, my aim is to have high quality links, but equally, there are some decent sites on the fringes that I will need to consider (based on a competitors link profile I researches).
White Hat / Black Hat SEO | | Jonathan19790 -
Hiding content or links in responsive design
Hi, I found a lot of information about responsive design and SEO, mostly theories no real experiment and I'd like to find a clear answer if someone tested that. Google says:
White Hat / Black Hat SEO | | NurunMTL
Sites that use responsive web design, i.e. sites that serve all devices on the same set of URLs, with each URL serving the same HTML to all devices and using just CSS to change how the page is rendered on the device
https://developers.google.com/webmasters/smartphone-sites/details For usability reasons sometimes you need to hide content or links completely (not accessible at all by the visitor) on your page for small resolutions (mobile) using CSS ("visibility:hidden" or "display:none") Is this counted as hidden content and could penalize your site or not? What do you guys do when you create responsive design websites? Thanks! GaB0 -
Does SEOMOZ provide any help regarding to Link Buildiing and directory submission?
Hi Everybody, I am trying to work out how off-site SEO works and I am facing some troubles when it comes to link building. Does SEOMOZ provide any solution to this? Regards, Guido.
White Hat / Black Hat SEO | | SilbertAd0 -
How do you deal with spammy backlinks?
One of the web designers I work with asked me to do a preliminary site assessment on a small business website. The owner of the business had a falling out with his previous web designer and moved over to the one I work with earlier this year. The site has been redesigned but when analyzing the back links I discovered that the previous designer had created directories to create backlinks to the page. The PR 0 links from the site number about 150 and are from unrelated topic pages. So, it made me wonder, how much damage can spammy backlinks do? What is the best practice to deal with spammy backlinks if you find them?
White Hat / Black Hat SEO | | TheARKlady0 -
Partners and Customers logo listing and links
We have just created a program where we list the customers that use our software and a link to their websites on a new "Customers" page. We expect to have upwards of 100 logos with links back to their sites. I want to be sure this isn't bordering on gray or black hat link building. I think it is okay since they are actual users of our software. But there is still that slight doubt. Along these same lines, would you recommend adding a nofollow or noindex tag? Thanks for your help.
White Hat / Black Hat SEO | | PerriCline0