Add www to the Root Site in WP Multisite Network

I have a WordPress (Latest version) based website with Multisite Network Enabled. For example, the domain is So, my root site is and my subsite is But I want my root site as To do so, I’ve taken 4 steps:

Modified .htaccess file. Added the code below:

RewriteEngine on RewriteCond %{HTTP_HOST} !^$   RewriteRule ^(.*)$$  1 [R=301] 

Modified wp-config.php:

define('DOMAIN_CURRENT_SITE', ''); 

Modified MySQL table wp_site. Old data: domain: New Data:


Modified MySQL table wp_sitemeta. Old data: siteurl: New Data:


But unfortunately, it didn’t work. What to do? Thanks in advance.