How Redirecting non-www to www in wordpress without using .htaccess?

Hello Everyone! I am here now just going to tell you all a simple way for redirect your wordpress website from non www(http://yourdomain.com) to www((http://www.yourdomain.com)) URL  OR  www(http://www.yourdomain.com) url to non-www((http://yourdomain.com)) URL. WordPress will 301 redirect your domain to the version (www or non-www) located in the Settings->General. Here you have just need to change …