Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirect non-www on a Wordpress site without using .htaccess

A developer that I worked with told me that we had the non-www version of the site redirecting to the www version using a Wordpress database setting, not the .htaccess file. Does anybody know how to do this?

like image 650
Kyle Suss Avatar asked Jan 18 '23 13:01

Kyle Suss


2 Answers

If you try to access a WordPress site using anything other than the site address set in the general settings tab (Go to the admin panel, and click on "Settings" then "General settings" in the left side menu) it will automatically redirect you.

like image 81
Vinay Pai Avatar answered Jan 30 '23 06:01

Vinay Pai


If you need non www pages / posts to redirect www url in simple way then follow this steps.

  1. login in to your admin panel
  2. go to settings options in left side bottom
  3. select General Settings
  4. add " WWW " in the begaining of both below fields. WordPress Address (URL) Site Address (URL)
  5. save and login again. You are done now.

Best Regards.

like image 41
Richardsan Gohil Avatar answered Jan 30 '23 04:01

Richardsan Gohil