Connect with us

Hi, what are you looking for?

Web Hosting

Code Snippet: 301 Redirects Using .Htaccess

HTACCESS 301 Redirects

A 301 redirect is a permanent way to let search engines and visitors know that an old page on your website has been replaced by a new one.

If you would like to create your own redirects using your website’s htaccess, open your .htaccess file (typically found in the root of your website) and add the following code:

Redirect 301 /myveryoldpage.html
Redirect 301 /login/

If you would like to redirect your entire website to a new website and you are keeping the exact same page structure you can add the following code to your old website:

Redirect 301 /

As an example, the code above will cause to redirect to so there is no need to worry about creating a separate redirection for each page.

One thing to note is that .htaccess redirections only work with Apache servers.

Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *


More On The Net BLog


As per our previous announcement, the Website Helper blog has now become Here we have it, 36 approved UK business directories you can...


CSS media queries are an excellent way to deliver different styles to different devices. Here are CSS Media Queries for targeting your iPad in...

Web Hosting

GoDaddy has become a household brand, they are one of the biggest website hosting and domain name companies in the world. However, being the biggest does...


Did you know that uninstalling WordPress plugins from the dashboard is simply not enough? Many website owners have most likely installed and tested several WordPress plugins but...


Are you looking for alternatives to to outsource your next project? For those that don’t know what is, it’s an online freelance micro job...


Traffic is bad on the road. But it is a blessing on a website or blog- as long as your bandwidth can handle it....


The problem faced by many WordPress websites using contact forms is spamming. It is frustrating and time-consuming to deal with. Spamming happens when malicious...


CSS media queries are an excellent way to deliver different styles to different devices. The rapid growth of mobile devices has made it a...