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?
- 
					
					
					
					
 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. 
Browse Questions
Explore more categories
- 
		
		Moz ToolsChat with the community about the Moz tools. 
- 
		
		SEO TacticsDiscuss the SEO process with fellow marketers 
- 
		
		CommunityDiscuss industry events, jobs, and news! 
- 
		
		Digital MarketingChat about tactics outside of SEO 
- 
		
		Research & TrendsDive into research and trends in the search industry. 
- 
		
		SupportConnect on product support and feature requests. 
Related Questions
- 
		
		
		
		
		
		Site Footer Links Used for Keyword Spam
 I was on the phone with a proposed web relaunch firm for one of my clients listening to them talk about their deep SEO knowledge. I cannot believe that this wouldn’t be considered black-hat or at least very Spammy in which case a client could be in trouble. On this vendor’s site I notice that they stack the footer site map with about 50 links that are basically keywords they are trying to rank for. But here’s the kicker shown by way of example from one of the themes in the footer: 9 footer links: White Hat / Black Hat SEO | | RosemaryB
 Top PR Firms
 Best PR Firms
 Leading PR Firms
 CyberSecurity PR Firms
 Cyber Security PR Firms
 Technology PR Firms
 PR Firm
 Government PR Firms
 Public Sector PR Firms Each link goes to a unique URL that is basically a knock-off of the homepage with a few words or at the most one sentences swapped out to include this footer link keyword phrase, sometimes there is a different title attribute but generally they are a close match to each other. The canonical for each page links back to itself. I simply can’t believe Google doesn’t consider this Spammy. Interested in your view.
 Rosemary0
- 
		
		
		
		
		
		Are All Paid Links and Submissions Bad?
 My company was recently approached by a website dedicated to delivering information and insights about our industry. They asked us if we wanted to pay for a "company profile" where they would summarize our company, add a followed link to our site, and promote a giveaway for us. This website is very authoritative and definitely provides helpful use to its audience. How can this website get away with paid submissions like this? Doesn't that go against everything Google preaches? If I were to pay for a profile with them, would I request for a "nofollow" link back to my site? White Hat / Black Hat SEO | | jampaper1
- 
		
		
		
		
		
		How do you change the 6 links under your website in Google?
 Hello everyone, I have no idea how to ask this question, so I'm going to give it a shot and hopefully someone can help me!! My company is called Eteach, so when you type in Eteach into Google, we come in the top position (phew!) but there are 6 links that appear underneath it (I've added a picture to show what I mean). How do you change these links?? I don't even know what to call them, so if there is a particular name for these then please let me know! They seem to be an organic rank rather than PPC...but if I'm wrong then do correct me! Thanks! zorIsxH.jpg White Hat / Black Hat SEO | | Eteach_Marketing0
- 
		
		
		
		
		
		Are link directories still effective? is there a risk?
 We've contracted a traditional SEO firm, mostly for link building. As part of their plan they want to submit our site to a large list of link directories, and we're not sure if that's a good option. As far as we know, those directories have been ineffective for a long time now, and we're wondering if there is the chance of getting penalized by google. When I asked the agency their opinion about that, they gave me the following answer - Updated and optimized by us - We are partnered with these sites and control quality of these sites. Unique Class C IP address - Links from unique Referring Class C IP plays a very important role in SEO. Powered by high PR backlinks Domain Authority (DA) Score of over 20 These directories are well categorized. So they actually control those directories themselves, which we think is even worse. I'm wondering what does the Moz community think about link directory submission - is there still something to be gained there, is there any risk involved, etc. Thanks! White Hat / Black Hat SEO | | binpress0
- 
		
		
		
		
		
		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
- 
		
		
		
		
		
		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 | | Wilkerson1
- 
		
		
		
		
		
		Does anyone have any suggestions on removing spammy links?
 I have some clients that recently got hit by "Penguin" they have several less than desireable backlinks that could be the issue? Does anyone have any suggestions on getting these removed? What are the odds that a webmaster on these spammy sites are going to remove them, and is it worth the time and effort? White Hat / Black Hat SEO | | RonMedlin3
- 
		
		
		
		
		
		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
 
			
		 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				