Can Google ban or penalize my site if I have some affiliate links on it and they are cloaked? E.g. My affiliate link is xxxyyy.com/my-aff-id and I make it look like it's a link to xxxyyy.com (using some onmouseover tags), so that in browser the links shows like it links to xxxyyy.com but in reality it goes to xxxyyy.com/my-aff-id Can this hurt my Google ranking?
You are far better off doing it via .htaccess, and also making the link Nofollow plus blocking it with Robots.txt In .htaccess place: Then block the whole /content/ folder with Robots.txt, this folder can be named anything innocent. Then on your pages, link to YourSite.com/content/download.php and add Nofollow to it. Far better then a mouseover cloak/redirect.
also add the following meta tags on your page: <META NAME="revisit-after" CONTENT="never"> <meta name="robots" content="noarchive"> <meta http-equiv="pragma" content="no-cache"> <META name="VIEWER-GOOGLE" content="NODISPLAY"> <META NAME="GOOGLEBOT" CONTENT="NOARCHIVE">
These tell Google not to go to your page, or crawl, index or archive it. Whatever you do, do NOT use these tags or you will never show up in search. Just use the .htaccess like i originally said.
Ya sweetfunny is absoutly right here. I always add no-follow to my affiliate links and it does seem to help also it saves the link juice for the important links.
I would cloak my links and then block the path to them. Example: www.yoursite.com/redirect/linkname.html then block the redirect folder in the robots.txt. Mouseover tags work great, but its best to use a link redirect software. Check out Manage Affiliate Links