How to Avoid Landing Page Redirects in WordPress

0

Minimize Redirects / Avoid Landing Page Redirects is Google’s page speed performance technique for better speed and user experience. HTTP server common redirects 301 (permanent) and 302 (temporary)  are server-side redirections, where user-requested pages automatically change from one URL to another URL or another location.

Redirects effect on page load time. When the browser request file or URL to the server, it will make a round trip for the original and redirected page. To minimize redirects always prefer HTTP 301 redirects to move your URL Structure.

When you have redirects, the browser has to be download files from CSS, Images and external files. Here server will take time to lookups user-requested location and redirect location.

Your website should stick with a consistent URL structure either www or no www.By default your web browser redirects example.com to www.example.com.But search engine’s point of view, it’s duplicate content. To avoid such problems, redirect non-www to www URLs.

If you are using WordPress, then 301 redirect non-www to www or www to non-www URL structure properly via .htaccess file. If you change directly without 301 redirections, then your previous articles show errors. After changing URL structure resubmit your website in Google webmaster tools, so search engine freshly catches your content with one version.

Using 301 Redirect

To redirect from www.example.com to example.com add the following code to your .htaccess.

# redirect www to non www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^yourdomain.com$ [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

To redirect from example.com to www.example.com, paste the following code in .htaccess file.

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

Finally, avoid landing page redirects for a better experience to users and speed up your WordPress website.

Leave A Reply

Your email address will not be published.