BLOG

“I still suggest you call
this page 42Lab.
Works for both of us!”
- Joey

WordPress 101: Tips, Tricks, & Hacks

WordPress, since it’s in 2003, has been a tool for great achievements. One of the most fundamental changes that have resulted in is the democratization of the internet. Now no longer are you bound by your knowledge of different website development technologies. Today you can go ahead and create your website and online identity without the help of a developer. 

In the long run, WordPress has evolved from just being a Content Management System. Now it has become a powerful ecosystem for creative endeavors. This spirit of creation encourages and invites many technical and non-technical people towards WordPress. 

Due to this, a wide variety of users have a very healthy number of user-community members. This is unlike other Content Management Systems whose user-communities are dominated by technical users. 

While using WordPress for designing and developing their websites, many users encounter a multitude of problems. One prime issue that many newbie and seasoned users face is the failure of redirecting traffic from a.WWW website to a non-WWW version of that website. 

Therefore to make the lives of all those WordPress users easy, we bring you a simple hack that will enable you to redirect traffic from yours.WWW website to a non-WWW version. 

The following steps elaborate on the hack: 

Step 1 – To redirect all your incoming traffic from your .WWW website to the non-WWW version add the following code to the .htaccess file:  

# Redirect Non-WWW to WWW

RewriteEngine on

RewriteCond %{HTTP_HOST} ^yourwebsite\.com

RewriteRule ^(.*)$ https://www.yourwebsite.com/$1 [R=301,L]

# END Redirect Non-WWW to WWW

# BEGIN WordPress

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

# END WordPress

Step 2 – Replace your website URL. Go to general setting options and add the WWW URL to the WordPress website’s URL.

42 works

Exploring the Future of Apps with Apple

Read Blog

Dream Bigger. Work Greener.
Explore Our New & Sustainable Workspace

READ POLICY
42 works
Get 42Works Blog updates in your Inbox!

    Ohio United States 3.144.154.208 https://42works.net/redirect-traffic-from-www-to-nonwww-in-wordpress/