Mobile app version of vmapp.org
Login or Join
Murray155

: How does a redirect using a .htaccess compare to a redirect via DNS records? Is there a reason to use one technique over the other or should I just use whichever is more convenient? Roughly,

@Murray155

Posted in: #Redirects

Is there a reason to use one technique over the other or should I just use whichever is more convenient? Roughly, I want to redirect myshortsitename.com to mylongersitename.com.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray155

3 Comments

Sorted by latest first Latest Oldest Best

 

@Cody1181609

Assuming the redirect is permanent you will get the fastest user experience by pointing the DNS records directly to the destination. The page load speed and the page route are important from several perspectives:


Your visitors will be happier and less likely to abandon prematurely.
Google's ranking takes into account page load speed.
No need to maintain an .htaccess file just for the sake of a redirect.
301/302 redirects may have issues with properly propagating the referrer header.
The more stops you have along the way, the more likely it becomes to have failures.


On the other hand, if not done properly and making the two domains seem as separate web sites, you risk being conceived as a site duplicator, and at diluting your traffic between the two domain names. To mitigate these risks I would advise to define the short domain name's DNS record as a CNAME that translates to the long domain name, and to embed in your pages canonical urls that will tell Google that both forms actually point to the same resource.

10% popularity Vote Up Vote Down


 

@Deb1703797

In fact, DNS does not redirect, It just resolves your given domain name (record) into a IP address.

In .htaccess, You can set different type of redirection using 301 (permanent) & 302 (temporary)

.htaccess redirection is very much useful, When you want to redirect certain set of URLs from your domain to another domain.
.htaccess redirection can also be used to redirect URLs within the same domain.

When you want to redirect your old business name to new business name, better to use 301 redirection, This will benefit in SEO.
Most of your old customers might search you online using "old brand name", which can be redirected to "new website"

10% popularity Vote Up Vote Down


 

@Jamie184

DNS does not redirect. It only resolves a domain name to an IP address.

With DNS, you can assign two domain names to the same IP address, but that is it. Nothing more.

If you need a redirect, then you will have to use the web server to achieve this.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme