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
-
Internal Website Linking from Syndicated Blog Posts
Does it help, hurt, or do nothing for my website's SEO if I do internal linking from syndicated blog posts (on my blog) to my website pages? For example, a syndicated blog post on winterizing your house has instances of "homeowners insurance" linking to my webpage on homeowners insurance. Proper canonicalization is done as well.
On-Page Optimization | | BFMichael0 -
Should an internal link open in a new tab or in the same window?
Should an internal link open in a new tab or in the same window? Seems like this is an issue that has never had a definitive answer one way or the other. But I couldn't find any recent articles from reliable sources taking a stance and answering this question. Does anyone know if user engagement metrics (time on site, bounce rate, pages per visit) are impacted if a user clicks a link that opens in a new tab? Thanks!
On-Page Optimization | | NicheSocial0 -
Can you use multiple keywords for on page for ranking?
I understand using a keyword (or phrase) and correctly building that into the site structure (URL, Title Tag, body, etc). So, this question is going to be elementary, but I am starting to question myself as I write content. I have a client, for example, that has a new site and a page for Chocolate cakes. Now the other pages they built out are for Cheesecakes, Cupcakes, etc. So we optimized the Chocolate cakes page with our keyword throughout (Getting an A+ on page content grade). But now they are asking me why they can't be found for chocolate eclairs, chocolate fudge cake, devils chocolate cake, double chocolate cake, etc. My first quick answer is that they should build more pages. But am I doing this wrong?
On-Page Optimization | | cschwartzel0 -
Too Many On-Page Links
Ok so I am very new to MOZ, and we have just set up our PRO account and campaign. When we got our crawl results we had 4 pages with "too many on-page links". All of these pages correspond with our blog, which is a wordpress hosted blog that is integrated into our site. Our site is www.moxicopy.com and the blog is www.moxicopy.com/blog I am confused on how we have over 100 on page links on these pages, as we have very few links on our blog.
On-Page Optimization | | Moxicopy.com0 -
Do we have too many links in our footer?
Hi guys, we have 41 links on our holiday(vacation) rental website, this seems too many when looking at best practice. 24 of these are links to community pages while 8 link to activities pages. The community and activity pages are also accessible from links on the top menu so they are not strictly necessary but do get 10% of site clickthroughs according to Google in-page analytics. I therefore do not want to remove the links if there is no good evidence that google will penalize us for this. What do you think would be best for our site? Thanks, John Tulley. footer.jpg
On-Page Optimization | | JohnTulley0 -
Internal Followed Links and Total Internal Links as 1
It is showing Internal Followed Links and Total Internal Links as 1 in OpenSiteExplorer Tool http://www.expresscasket.com/ http://www.opensiteexplorer.org/comparisons?site=www.expresscasket.com Not able to understand and identify the problem and fix it. But when i check in google webmasters tool, it is showing lots of internal links. Does it differ those internal links and your trace of internal links
On-Page Optimization | | expresscasket0 -
My nofollow link is showing as a 302\. Is this OK?
My nofollow link is showing as a 302. Is this OK? Not looking to pass any juice along but don't want to be penalized either. Thanks Buhrly
On-Page Optimization | | Buhrly0