: 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,
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.
More posts by @Murray155
3 Comments
Sorted by latest first Latest Oldest Best
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.
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"
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.