How can I nofollow my affiliate links?
-
I have a lot of affiliate links and I need to find an efficient way to nofollow them. I have over 500 blog posts and most have an affiliate link. I use Wordpress and Genesis. Any advice?
-
That would take forever! Seriously! But I have no programming skills whatsoever.
-
I used http://wordpress.org/plugins/nofollow-for-external-link/ or SEO Smart Links before just to do mass no follow. For affiliate sites that i didnt want to bother with anymore.
-
The other way is a manual way where you have to get in to every post and add rel = 'nofollow' on each affiliate link but if you have programming skills and can create a PHP script then go for the idea suggested above!
-
You can either create a script to go over the posts, recognize some pattern on the links and add the nofollow attribute, or edit post by post adding the nofollow.
As you mentioned Wordpress, a PHP script should do the work very fast and easily using an html DOM parser.
Here's an example: http://simplehtmldom.sourceforge.net/
and run something like:
foreach ($html->find('a') as $a) {
if(!checkUrl($a->href)) {
$a->rel = 'nofollow';
}
}checkUrl is a function you should write to recognize those affiliates links...
Hope that helps!
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
-
Two links to different page with same link label
What will be the impact in Google if I have two links in the same page pointing to different pages, but with the same label.
On-Page Optimization | | kjerstibakke0 -
Follow or nofollow the social links?
I recently seen a site that has delibrately no followed the links to there social sites. The company's Google Plus, Facebook and twitter icons all no followed? I would have thought you would want google to know about these profiles? Whats everyone elses take on this?? shivun
On-Page Optimization | | seohive-2227200 -
What is on page links?
Hi - i would like to know exactly what an on page link is? i understand the linking system however cant work what exactly what an on page link is? Thanks
On-Page Optimization | | OasisLandDevelopment0 -
Can RSS Title tags be optimized?
I need to know if one can optimize RSS feeds to a particular Physical Location. As an Example if my website has RSS feeds for Travel. Can I optimize the individual Title tags to Travel in Maryland, Washington DC, New York etc?
On-Page Optimization | | sherohass0 -
Nofollow tags
So on the homepage, should all the links like privacy, contact us, etc...be rel="nofollow" ? I want to get a better handle on passing as much link juice on homepage to important internal pages as I can, and want to get it right. Thanks in advance.
On-Page Optimization | | azguy1 -
Max # of recommended links per page?
I've heard it said that Google may choose to stop following links after the first 100 on a page. The landing/category pages for my site's product catalog have earned quite a respectable PR and positioning in search results, and I'm currently paginating their product listings (about 200 products in a category) so that only a couple dozen products are shown on the first page, with links to "next page" and "previous page" being accomplished via query string (i.e. "?page=3"). An alternative option I have is to link to 100% of the contained products within the category's landing page (which would increase my on-page link count to ~300) and use CSS/Javascript to allow the user to simulate browsing between pages on the client side. My goal is to see as many of my product pages indexed as possible. Is this done better using my current scheme (where Googlebot would have to navigate to, say, Landing Page -> Page 6 -> Deeply Buried Product Page) or in the alternative method above, where all the links are in a single page? Since my landing pages are currently treated pretty well by search engines, would that "trust" cause them to follow more links than might normally be done? Thank you!
On-Page Optimization | | cadenzajon0 -
Too many on page links
Our home page (and 1400 of our other pages) have well over 100 links, going beyond the recommend amount. Our competitors have less on page links (to other pages on their site) and way more link popularity so we are trying to figure out the best solution for this without hurting our sites conversions and usbaility.
On-Page Optimization | | iAnalyst.com0 -
Relative links
Hi, How much of an SEO issue is it to have relative links vs. fully written out links, like http://www.seolinkquestion.com/my-silly-question ? If I have a site that uses relative links, should I change them all? Thanks...Mike
On-Page Optimization | | 945010