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
-
Several Links in Some Pages
Dear all, Our main site is a bussiness directory, and following some SEO advices, we are creating landing pages for each category, in order to optimize them for the keywords. Those landing pages have links to the listings related to them. Using the same idea, we have created pages related to the regions, and those pages include links to the listings located in them. The only problem that I see with that, is the number of links that some categories or regions could have. Is there a limit of recomended number of links per page, from a SEO perspective? We also have a main category page, that includes a list of all categories, and this page could also have a relatively high number of links. The pages have around 300 to 500 words, some include also images, some include videos. Many thanks for your help, Daniel
On-Page Optimization | | te_c0 -
Do Navigation links count the main link on the page?
After reading this article http://www.seomoz.org/learn-seo/anchor-text it talks about how only one link per page counts if they are going to the same page. This is what i had learned in the past; however, my understanding was if it was a in the main navigation as a child or grandchild or in the side navigation and then in the main body text, the link in the main body would count/ be held higher than the other options.
On-Page Optimization | | DoRM0 -
Do the rules of “natural” linking apply to on-site crosslinking as well?
At an SEO conference I attended the speaker said that Google wants the anchor text of a link to be more natural. Specifically you mentioned that the anchor text should be the company brand, the domain name/URL or a call to action (ex. “Click here.”) I thought this was an interesting idea for offsite linkbuilding. BUT, my question is…Does the rule also apply for on-site crosslinking between my webpages? Is there potential harm or a benefit to adding keywords to the anchor text of the links within my site?
On-Page Optimization | | donationtown0 -
Can internal duplicate content cause issues?
Hello all mozzers - has anyone used nitrosell? we use them only because their inventory connects to ours epos point but because they have thousands of 301s on our domain we are getting duplicate content because different sizes of products (we sell womenswear) are creating seperate URLS so we are duplicating both content and URLS - im curious as to whether anyone has experienced simillar problems that have affected their SERPS? Best wishes, Chris
On-Page Optimization | | DaWillow1 -
If I have too many on-page links can I reduce it with nofollow tags or do the links have to be removed?
On my site I have a top nav drop down menu but once visitors go to one particularly large subsection, that menu is repeated on the left for easier viewing. As a result, I shoot over 100 links on page. Can I put nofollow or noindex tags on the left side links and reduce my "official" on-page links count or do I have to actually eliminate some of the links? Thanks, Oak
On-Page Optimization | | CSA-2316710 -
Finding 404 links
My first campaign is nearly complete and I have like 40 - 404's. How can I find where these links are on my site? We recently moved over to WP from html and that's what happened.
On-Page Optimization | | azguy0 -
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 -
Can you optimize for 2 keywords per URL?
Or should you just stick to 1 page, 1 keyword all the time? If you do 2, are there any things you should watch out for? Thanks
On-Page Optimization | | inhouseninja0