Solution:2
In order to do redirects on your WordPress site, you need to access the .htaccess file. This is how to go about it:
Connect to your WordPress site’s root folder. You can do this via File Manager in your cPanel or use FTP.
Once you are here, access your .htaccess file.
Back up your .htaccess file before making any changes.
You can then make the necessary changes (the code is the same as what we had looked at earlier when we discussed .htaccess in the previous section, here we will cover what was not looked at then)
Redirecting files to SSL
If you have recently added an SSL certificate to your site, you need to add 301 redirects that will send all HTTP traffic to HTTPS. This not only ensures that your visitors access a secure site but also avoids duplicate content.
Here is the code:
RewriteEngine on
RewriteCond %{HTTP} off
RewriteRule ^(.*)http://%{REQUEST_URI} [L,R=301]
Redirecting an entire domain to a new one
Here is the code if you are moving the entire WordPress site to an entirely new domain, for example, abc.com to abc.co. Note that this code needs to be added to the old domain name’s .htaccess file (abc.com).
#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.abc.co$1 [,R=301,L]