Hacker News new | ask | show | jobs
by iamchrisle 4531 days ago
The .htaccess file is important for SEO. For the context of the blog (seogadget.com), it's worth noting that SEO is more important than performance.

The .htaccess is used to 301 redirect www.bennet.org to bennet.org. Important for SEO so that Google only indexes one domain instead of the domain and the subdomain. Only indexing one domain gives it a better chance of ranking higher.

Also.. do you really think the traffic and 453k of bandwidth is really going to put any strain on performance?

2 comments

The .htaccess file is not required for anything. Anything that can be put into .htaccess can be put into httpd.conf or one of the virtual host confs.
Agreed. However, in a shared hosting environment (which most personal sites are in), you can't edit the .conf files.
Which goes right back to the original piece of advice: if you have access to the main apache config, put your changes there for performance reasons. Otherwise use .htaccess.
> Anything that can be put into .htaccess can be put into httpd.conf or one of the virtual host confs.

Also, important to note, "and not vice versa" (i.e. httpd.conf much more powerful)

.htaccess is read only by the webserver, never by the crawler or client. So how you implement your redirect (through .htaccess or central apache config files) will not affect how an outsider sees your website.

I'm pretty sure Google is smart enough to understand DNS CNAME records, too.