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
-
How can I drive organic traffic to a specific landing page?
HI, I have a site which is attracting traffic for my target keywords but to the wrong pages. I usually create a series of articles on the topic (10-15) an start getting organic traffic, but I have not been able to drive the traffic to the main page for that topic. How can I get the main page rank over sub pages? Thanks in advance!
On-Page Optimization | | Rajaindiain0 -
Alt text / internal linking
Hi everyone A question about best practice when linking from pictures on our homepage - hirespace.com We have an option of using divs with background images (nicer in terms of design) but it means that we can't use anchor text or alt text to show Google what these internal links are about. The other option is to use images which do not allow us as much flexibility in terms of CSS but would allow us to use alt text. There is also an opinion that we should have separate text links at the bottom of the homepage to get the anchor page in. What is best practice in this situation - is alt text worth sacrificing some CSS flexibility for? How important is anchor/alt text for internal linking? Thanks guys.
On-Page Optimization | | HireSpace0 -
Web Design - Text links better than drop down menus?
Hello So with reading a blog post by Bruce Clay - http://www.bruceclay.com/blog/seo-friendly-web-design/ It reads that it Is best for seo to use text links instead of drop down menus. So I just wanted to ask you opinion.
On-Page Optimization | | Berner0 -
E-commerce On Page Concern - Links and Anchor Text
Hi, how you doing? I have a set of very specific questions or concerns about anchor text and linking on an e-commerce category page. I was wondering if you could give your opinions and counsel. I own an e-commerce store about steel construction products. I have several category and product pages. One example of my categories is this. URL http://aceromart.com/Losacero-25-Ternium.aspx My concerns or questions: I have several technical specs or sheets. Which i include the link on the right part in "Informacion Adicional". How should i link those? I am bit worried on the anchor text. Should i use something like [download "product" technical sheet] or just [technical sheet of product] . I dont want to cannibalize, but i also want to appear as descriptive as possible. what would you recommend? The same thing happens on my videos. How should i link my videos? Is there a best practice? **what would you recommend. ** Thanks in advance for your opinions!
On-Page Optimization | | JesusD0 -
Which pages should use rel="canonical" links?
I have many pages showing up as multiple content. Most of the them belong to product pages for my store, login pages that show up everywhere on the site, etc. I know that I need to use the rel=canonical link in the header but after searching the forum I'm still unsure of what pages need it. Is it the pages that I don't want searched/crawled by Google or the other way around? Thanks! Crystal
On-Page Optimization | | COfashionista0 -
Can someone take a quick look at my blog?
hey guys, just joined seomoz. was wondering is someone could take a quick look at my blog and see if it is fine to start hitting SEO hard? my top bar title has a few of my targeted keywords, is that a good idea or? http://www.onestopmuscle.co.uk
On-Page Optimization | | FLEAR0 -
Nofollow on these internal links?
On an x-cart ecommerce website we have, seomoz has picked up a lot of duplicate content, based on URLs that are different, but are essentially the same page. These come from Fitlers, that allow a page to show only certain colours and styles, reordering page by price etc, and also the page 2, page 3 etc of a category: All the below are '4ft-bedding.html' http://www.textilesdirect.co.uk/store/4ft-Bedding.html?filter=1&value=Pink http://www.textilesdirect.co.uk/store/4ft-Bedding.html?page=2 http://www.textilesdirect.co.uk/store/4ft-Bedding.html?sort=price&view_all=Y I've now changed all these internal links to rel="nofollow" on the a tag. Is that the correct and best way to sort? I might be mistaken on when I did this update and when the last report was ran, but on the SEOmoz crawling report, it still has the above as problem pages. thanks!
On-Page Optimization | | rowleysit-2598920 -
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