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
-
Can Google read this code?
I'm working on some basic on-page SEO content for a website within my company and I need some guidance as far as 1. whether Google can read the small amount of existing text (not optimized) and if it isn't spiderable, then 2. what code should be there instead. Here is the site: https://www.le-velgear.com/store/catalog The text I'm referring to is toward the bottom of the page (isn't it always?) and says this: Designed for a Thriving Lifestyle The Le-Vel Gear store is an extension of the LV Life, the Thrive product line, and the world's largest health and wellness Movement, which you helped create. Living a life you deserve includes looking good while showing the world your pride in being a Thriver...Check out all the new and incredible gear and tools and take your Thriving lifestyle to the next level!!! When I "View Source," I cannot see the text, however, the text is highlight-able with my cursor and I can see it when I "Inspect Element" in a container that says Thanks in advance for any help!
On-Page Optimization | | lizzyr0 -
Can Javascript Links Be Used to Reduce Links per Page?
We are trying to reduce the number of links per page, so for the low-value footer links we are considering coding them as javascript links. We realize Google can read java, but the goal is to reduce level of importance assigned to those internal links. Would this be a valid approach? So the question is would converting low-value footer links to js like below help reduce the number of links per page in google's eyes even though we're reasonably sure they can read javascript. <a <span="" class="html-tag">href</a><a <span="" class="html-tag">="</a><a class="html-attribute-value html-external-link" target="_blank">javascript:void(0);</a>" data-footer-link="/about/about">About Us
On-Page Optimization | | Jay-T0 -
To many links on page and penguin
Could to many links on to many pages be a factor that the penguin update would effect your site. I know this is a broad question , but I am curious what people think.
On-Page Optimization | | cbielich0 -
How long can rich snippets be?
How long (how many words) can a description tag of a rich snippets code?
On-Page Optimization | | seoflorida0 -
Internal links
Hi, I am working on a project with very few really important pages - its now about 20 pages and this number will not increase to more than 30 by the end of the year. Today the majority of these Pages is 2 clicks away from the Homepage for navigational reasons. Now I am wondering: 1. If I should set links from the Homepage directly to these Pages to pass more juice?
On-Page Optimization | | Naturalmente
2 If you would suggest so - how would you recommend me to do this in Terms of usability and SEO? thanks in advance for your help.0 -
Do anchor links pointing to bottom/top of page count as link?
As the title says: Do anchor links pointing to bottom/top of page count as link? This page: http://www.betxpert.com/forum/bookmakere/vis/ladbrokes-kommentar I has over 300 links, but I don't see that many links. Is it the "#15" and the top/bottom of page anchors that count? Is this harmful in terms of link juice? -Rasmus
On-Page Optimization | | rasmusbang0 -
Internal Followed Links:
Ran Open site explorer on my site: www.psbsperakers.com It is saying that I only have "1" Internal followed link could somebody tell me what that means... and maybe take a look at my site and see it this is a quick fix?
On-Page Optimization | | kevin48030 -
100 links on one page
we're recommended 100 links or less on one page. is the 100 links including header and footer links?
On-Page Optimization | | jallenyang0