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
-
Too much internal linking?
Hi everyone, Too much of anything is not good. In terms of internal linking, how many are too many? I read that the recommended internal links are about 100 links per page otherwise it dilutes the page's link equity. I have a concern about one of our websites - according to search console, the homepage has 923 internal links. All the pages have a corresponding /feed page added to the page URL, which is really weird (is this caused by a plugin?). The site also has an e-com feature, but it is not used as the site is essentially a brochure and customers are encouraged to visit the shop. I assume the e-com feature also increases this number. On the other hand, one of the competitors we are tracking has 1 internal link site-wide. Ours is at 45,000 site-wide. How is it possible to only have 1 internal link? Is this a Moz bug? I know we also need to reduce our internal links badly, however, I'm not sure where to start. I don't know how these internal links are linked together - some aren't in the copy or navigation menu. When I scan the homepage links using 'check my links', the total links identified for the homepage is only 170. kAeYlTM
On-Page Optimization | | nhhernandez0 -
Blog issue broken link
Taking Great Photographs Underwater May 25, 2015 By sdwellers@aol.com No comments yet florida keys, key largo diving Excuse my ignorance, I suspect this is an easy issue...but at the the top of each of my blog posts have what you see above....the "No Comments yet" tab is showing as a broken link 404 error...?Why? And how to fix?Thank you
On-Page Optimization | | sdwellers0 -
Link in H1 tag?
Hi guys, We're working through a redesign of our product page and are considering the following: http://screencast.com/t/NBSsDGA9vgS3 Currently the product name (including the brand name - Arc'teryx) in this case is included in the H1 and none of the title is linked. You can see this here: http://www.evo.com/synthetic-jackets/arcteryx-atom-lt-hoodie-womens.aspx The firm we're working with is proposing keeping the entire title in the H1 but linking the brand name to the entire brand assortment. My concern is that the brand name is a critical part of the product title and should be text (not a link). Any suggestions? Thanks!
On-Page Optimization | | evoNick
Will0 -
Which pages on my site should I back link to
The majority of the back links I have been creating link directly to our home page and to the store page. Is this the best approach or should I be trying to spread the links throughout our site to include product categories and subcategories etc?
On-Page Optimization | | Hardley0 -
Thoughts on these footer links
I have a site that has about 20 footer links. A main Category and 4-5 links under each. The site is very large, so I feel they do have some value for navigation, and they don't blend in with the background at all. I know penguin was cracking down on footer links, but I don't feel theses are "spammy" links. Will it hurt long-term to leave these links, or should we pull them?
On-Page Optimization | | netviper0 -
Can Page Authority of a site be higher than its Domain Authority?
I own a website called Takeyourtips.com. While doing a search no Google, I found that the page authority of the home page (31) is higher than the domain authority (23). I was wondering if it's really possible because my understanding was page authority of a page is determined by its domain authority. Therefore, it the domain authority of a website is 23, none of its page could have a higher page authority. Plus, upon consulting an SEO expert, I was told that neither Domain Authority or Page Authority of a page carries any importance as far as higher ranking of a website is concerned. Is this true? Thanks in advance for the answers. Cheers, Sushant large
On-Page Optimization | | suskanchan0 -
Too many On-Page Links warning + Javascript Menu
We do have javascript menus on each page. These are used by a visitor to contact a specific office in a specif city. Could this be where all these links are being counted? I don't see them elsewhere? What about links that are in the footer? They actually link to the same pages as the menus, but are just straight links.
On-Page Optimization | | Stevej240 -
How many keywords / phrases can you SEO for?
Might sound like a bit of a daft question to you pro's but here it goes... I am been doing in house SEO for a company for a short while and since I have been managing it things have moved quickly in the right direction but I find myself limiting our SEO efforts to three key terms. Is this usual? The reason I am doing this is because I find that on page SEO is only really possible with those amount of terms (with regards to title, description, key word density, seo copy, on page links etc). I guess that what I trying to stay is: If I push on page opitimastion to more key terms will it be detrimantal to our current efforts? and Is SEO possible for additional key phrases which are not on page optimised?
On-Page Optimization | | RikkiD220