Category Archives: .htaccess

Why HTTPS?

As a start in a 2017 effort to update and revamp TidyDesign.com, we have upgraded to HTTPS, the security-concerned friend of HTTP.

HTTP stands for HyperText Transfer Protocol, and it denotes the set of rules computers use while communicating in HyperText (web pages) over the web. That HTTP’s rules underpin the web can be seen in the typical URL – “http://website.com”. The prefix to that address denotes the protocol in use.

You may have noticed that more and more sites over the past decade are labelled with a different prefix – “https://website.com”. This denotes that the site is accessed over HTTPS; or HyperText Transfer Protocol Secure. HTTPS adds security concerns to HTTP’s base ruleset, ensuring that all transferred data is encrypted, undamaged and travelling to an authenticated recipient (in other words, HTTPS helps ensure that you are actually browsing Amazon.com, not someone pretending to be Amazon).

For the modern web, HTTPS is important. There’s no way around it. HTTP doesn’t concern itself much with secure communication, because the original purpose of the web was just to share textual information. The modern web, by which we trade personal details millions of times a second, requires a more secure underlying ruleset. When you’re sending someone your credit card details to make a purchase, you’re going to want that to be encrypted – it’s as simple as that.

There are reasons other than adapting to industry standards to upgrade to HTTPS, from SEO to simple consumer reassurance. Google ranks secure sites higher than insecure sites by default, so upgrading is a good first-step for getting to page one. Consumers are becoming more aware of security concerns on the web, too – largely thanks to that green padlock you see next to secure web addresses in the browser – and are less likely to provide any details over an insecure connection. The sound theory is that if you provide a secure connection, your customer is much more likely to contribute to your business with confidence.

Implementation of HTTPS for a domain involves purchasing a certificate from a Certificate Authority, and some server configuration. Those certificates verify domains as being owned by the people who claim to own them, facilitating the green padlock your users will see. Here at Tidy, we’re happy to provide this service and set up secure connections, moving the web forward and growing your business – just give us a call, or send us an email.

Jonno

Redirect www.domain.com to domain.com using .htaccess

Just a quick blog post to share a cool little trick; how to redirect www.domain.com to domain.com using .htaccess

Ok, an Apache Web server supports URL rewriting with the mod_rewrite engine, so if you place various rules within a .htaccess file on your server, you can assist both search engines (who can usually figure out which format is preferred) and people who visit your site.

How to redirect www.domain.com to domain.com

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]

And if you wanted to re-direct domain.com to www.domain.com then you would use

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]

Please note that both of these rules are search engine friendly, plus if you have pages within your site such as about.html or contact.php then the rule will also apply to them! There is also no right or wrong when it comes to domain.com or www.domain.com, it is personal preference!