.htaccess a şu kodu ekleyebilirsin.
RewriteEngine on
# No Spam
RewriteCond %{THE_REQUEST} \?(ref=.*)?\ HTTP [NC]
RewriteRule .? http://www.siteadı.com%{REQUEST_URI}? [R=301,L]
Google /?ref= görmesin diyorsan,
robots.txt dosyasına
Disallow: /?ref=
ekleyerek halledebilrisin sanırım.