Skip to content

Comment on Name.com: Another Unscrupulous Registrarparent

Comments

For most people the solution is very simple. Use a rewrite rule in your web server config. In nginx:

  if ($host !~  "^(example.com|beta.example.com|valid.example)$") {
      rewrite  ^/(.*)$  http://example.com/$1  permanent;
  }
http://www.example.com/about

or

http://fuckshit.example.com/about

becomes

http://example.com/about

This is good practice in any case, so that you're always serving up the canonical URL.

I would much rather http://fuckshit.example.com/ end up at a browser error page instead of being redirected to my site. This prevents the clever person who decides to link to me with http://fuckshit.example.com/ as the URL. (And I use mod_rewrite for naked domain to www redirect, so I'm familiar with this.)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.