Does anyone know how to attach a sitewide "nofollow" tag to ONLY one, particular domain? I'm having a problem with a handful of people posting links to the same few sites, and I think it is affecting my SEO rankings. I do not want to have to use global nofollow against all domains, just the couple of trouble-makers. Please advise.
I don't know if it's possible, to be honest. Then again, I may be misunderstanding your situation and question.
In most program languages, that is done with a simple "if" statement. What language are you using on your server to generate that links ?
Yes, it can be coded. You will need a regular expression to figure out whether the url is from a certain domain. Additionally, you might want to consider using a regular expression to test for dodgy domains (ones with porn keywords, for instance, or anything at all you don't want to be seen linking to). That way you can nofollow links for all kinds of things that would be likely to cause trouble. If you're doing it for one domain, you might as well save time and add a whole bunch of undesirable keywords to your list of urls to nofollow.
CSS is a presentational markup language that compliments (X)HTML's structural markup language - it has absolutely nothing to do with blocking domain names.
Here's my scenario: Aside from my forum, I also have another old site that has thousands of pages. They are NOT dynamiccally-generated pages. Each page has a separate html file. Now, on all of those pages, there are hyperlinked sites to which I no longer wish to pass PR. I'm hoping that someone can show me the exact code to place in .htaccess (if possible) that will put a "nofollow" tag on a particular domain throughout all of my thousands of pages.
AFAIK you can't do this in .htaccess. You may be thinking of mod_rewrite, but it doesn't work that way: it doesn't rewrite all the urls in your pages for you, just redirects one url to another. I know I've explained that very crudely, but I don't think .htaccess is your answer.
Ok, you're going to have to do a mass find/replace (one of the few times I suggest using something like Dreamweaver), but add rel="nofollow" to the links you want to block from the search engines. Here's an example: <a href="http://www.badwebsite.com" rel="nofollow">link to site you no longer want to be followed</a> Code (markup):
To do it sitewide, you would need to be running a particular software CMS or custom software engine. Examples include: WordPress, vBulletin, etc. You'd need to code it into your server-side code (PHP, ASP, etc) that generates the links. If you have a central configuration include where you could specifiy your conditions, then that would make it easier to do.
Yeah, that has always been my worst-case option. I can do it with BBEdit. The problem is that I have to download 40,000+ files, do the mass edits, and then upload the 40,000+ files back to the server. That literally takes all day. I was just hoping there was a quick fix option. Oh well, old school it is!
You're using a Mac, right? If so, just go to www.adobe.com and download a trial version of Dreamweaver. Set up a "site" (that's what Dreamweaver calls a collection of files) and let Dreamweaver go through and edit your links to that domain so that the rel="nofollow" attribute is added via a mass edit. Should take no more than 5 minutes.