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
-
Should I add canonical links to pages that are redirected?
Hello! I am a little confused concerning canonical links. I have several URLs that all access my page, but I redirect them all. A lot of places I am told to redirect them or use canonicals. Other places, I read that I should always use canonicals. What is the right way for me? If I should use canonicals as well as redirects, which links should I do this on? I redirect my pages like this: http to https:
On-Page Optimization | | hermanok
http://example.com -> https://example.com www to non-www:
https://www.example.com -> https://example.com Remove trailing slashes
https://example.com/ -> https://example.com Would-be 404-requests to index.php?p=$1
https://example.com/home -> https://example.com/index.php?p=home ( show as https://example.com/home ) Example:
http://www.example.com/home/ -> http://www.example.com/home/ -> https://example.com/home/ -> https://example.com/home -> https://example.com/index.php?p=home ( shows as https://example.com/home ) Thank you!0 -
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 -
Automated checking for broken links within content pieces
Hi, I am wondering if anyone can send me in the right direction on a system suggestion. We have currently grown out amount of content pieces on our website and our manual checking if the links in the content pieces are still 200 status is becoming extremely time consuming. Does anyone have a recommendation of a system that will crawl your pages and check both the internal and external links within the content for a status code (404,200,etc)? Preferably something server side so it can just run on a schedule but really anything would be fine. I have tried things like Screaming frog, etc and it just doesn't seem to be the right tool.
On-Page Optimization | | GoAbroadKP0 -
Is there a tool that I can use to scrape and see metatags?
Looking for a tool that allows me to scrape the websites off a page listing of Google and output a spreadsheet with the websites and their related meta-tag details (mainly title tag). Is there a tool out there that can conveniently allow me to do this?
On-Page Optimization | | Gavo0 -
Nofollow within your site, is it ever a good idea?
I started a new job running a companies E-commerce site. I have been going thought the site, backlinks etc to see what the current status is. I have noticed that they have "no followed some categorises on the (huge) mega menu, but also they have no followed every product form categories. Now personally I would have no follows on the login/register/checkout page, and maybe some external links, but my understanding has always been that by using no follow on internal links you just throwing away google juice. I'm thinking was someone at some stage trying to do some misguided link sculpting with no follow, or I'm I missing something Note: the company does not have brands per say for the product pages and so are not landing pages (the categories are landing pages)
On-Page Optimization | | PaddyDisplays0 -
Too Many Internal Links Reported By SEOmoz
Hi, I recently did run a crawl report for my blog dapazze.com, and found that SEOmoz is reporting many pages on my blog having more than 100 internal links. I opened OSE, and made a search for one of my pages which was reported to contain more than 100 links. And I found it to contain 464 internal links. Here is the link: http://www.opensiteexplorer.org/links?page=1&site=dapazze.com%2F2012%2F10%2Fwin-a-commentluv-premium-single-site-and-multi-site-license-worth-about-154-giveaway-of-october%2F&sort=page_authority&filter=&source=internal&target=page&group=0 Please have a look at it. I have chosen - Show "All" links from "only internal" pages to "this page" option in OSE, which reports me this. I see almost every page in my blog linking to every page. This is not the problem for me. I have also tried to make a search for some popular bloggers, like ProBlogger.net, ShoutMeLoud.com, HellBoundBloggers.com, etc, and all of them have the same problem. Should I be worrying about this problem? What is the problem actually?
On-Page Optimization | | rahulchowdhury0 -
Using Iframes for Affiliate Ads
Hey all, I got a question: is it Ok to use an Iframe for example to list some Vacation Houses in my Travel Website? This is an Affiliate kind of Program Iframe Link. I did write unique Content about 400 Words and put this Text below the Affiliate Iframe, is this good or not?
On-Page Optimization | | myrtus190 -
Re-optimizing onsite SEO, can it hurt?
We finished the re-design of our website a few months ago. We have hired a few freelance SEO guys that were horrible. We then decided to pull the SEO work in-house. I got nominated to do the SEO work. I started with what I thought was pretty good on-site SEO. At that time, with no experience, I was pretty proud of myself. I managed to get a bunch of our pages at top SERPs for long-tail keywords. Good enough for then. Now when I go look at the pages, I'm embarrassed to admit that it's my work. Please be kind. 🙂 Since then I have been trying to learn as much as possible about SEO. I'm certainly far ahead of where I was a few months ago. For the past few weeks I've been trying to focus my efforts on creating original keyword rich original content. Our competitors all have tried this, but their content is hardly readable by humans. Anyhow, we finished our fist article, it got indexed by G almost immediately and started to push our keyword SERPs up within just a few days. Now for my question. I have a much better understanding of on-page SEO and realize that I could make many improvements to ALL of our other pages. However, these pages are already doing fairly well with the SERPS and are moving up a few ranks a week. I'm very tempted to throw caution to the wind and completely redo all of our on-page SEO for our entire site. Is this a good strategy?
On-Page Optimization | | dmac
Should I expect our SERPs to drop a little, a lot, or not at all? I look forward to your response. DMac0