Terug naar overzicht

Website redirecting and referring

We are regularly asked if we can set up a redirect for a specific website. Unfortunately, we are not allowed to make DNS changes or content changes to your environment. This article will therefore help you get started.

If you do not know exactly what the impact of what you change will be, it is best to consult a web builder. The solutions discussed here are offered as-is and do not entitle you to implementation or management support.

DNS redirect

It is possible to use DNS to set up a redirect from your website. It is only possible to redirect your domain name to another domain name, it is not possible to redirect to a subpage. An example: you have the domain name www.uw-bedrijf.nl and you want people visiting this address to be referred to www.uw-andere-bedrijf.nl. This can be set via DNS. If you want people to arrive at www.uw-andere-bedrijf.nl/ons-bedrijf, this is not possible via DNS.

You set up such a redirect via a CNAME record in the Online Service Manager. You can find more information about the Online Service Manager and DNS in particular here. Below is an example of a redirect using a CNAME in the Online Service Manager:

This change will be visible all over the Internet about an hour to an hour and a half after it has been made.

Redirecting using a .htaccess file

A .htaccess can be used to set up the automatic redirection of a visitor to another location. For example, you can redirect a page that has been moved or renamed to the new page so that people who have a bookmark to the old location still end up on the correct content. When creating such a redirect, it is advisable to use a so-called 301 redirect. By doing so, you indicate to search engines that this referral is permanent. You indicate a temporary reference by means of a 302 redirect.

A .htaccess is created by creating a new file in a text editor such as Notepad, preferably not Word, and naming it .htaccess. Use .htaccess as the extension and not an extension such as .txt. The file should therefore be called .htaccess and not .htaccess.txt. When you have created this file, you can enter the options you want to give it. You then place the .htaccess on your web hosting.

Using a .htaccess 301 redirect, it is possible to redirect an entire folder of content or just a specific page. The example below relates to referencing a specific page:

Redirect /index.php https://www.uwbedrijf.nl/ander...

If you want to redirect an entire folder use the following line:

Redirect 301 /oudemap/ https://www.uw-bedrijf.nl/nieu...