Step 3: If the nameserver are pointing to the server also make sure that the A record for www is updated
login to your UCP account >> go to DNS Zone Editor. >> select the domain name from the drop-down menu >> and click on Edit.
Check if A record of www is updated if it is not updated then
To add the A record go to the bottom and click on Add New Record >> enter the appropriate details >> click on save
For Example:Enter Hostname as www and target as 45.113.136.168 which is your IP and click on Save Changes.
After you have added the record >> login to root access in the command prompt >> and type " service named restart "
Step 4: If you want to create a 301 redirect forcing all http requests to use either www.example.com or example.com.By default your website can be accessed with both www.example.com and example.com. Since Google penalizes this due to duplicated content reasons, you should restrict the access to either www.example.com or example.com. Some links may be outside of your website scope and/or the search engines may have already indexed your website under both addresses.
To create a 301 redirect check if you are having .htaccess file under public_html add the redirect rule in it or else create a new .htaccess file and add the below redirect rule replacing the domain_name with your domain name inside .htaccess and save it
<ifmodule>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^domain_name$ [NC]
RewriteRule ^(.*)$ http://domain_name/$1 [L,R=301]
</ifmodule>
Example1- Redirect example.com to www.example.com:
<ifmodule>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
</ifmodule>
Example 2- Redirect www.example.com to example.com:
<ifmodule>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?$ "http\:\/\/example\.com\/" [R=301,L]
</ifmodule>
Note:
>> Kindly check whether your domain name is pinging or not with prefix www using the command
ping www.example.com
>>Check whether your domain name is pointing to VPS Web Server or Cloud Based Server using the command:
dig example.com
If you need any assistance, feel free to contact our technical team members as they are available 24/7 via phone call, email, ticket system or call out toll-free no 1800-123-8642.
Website is not opening with www prefix
What is the Issue?
Website is not opening with www prefix which is very common and many user will assume that they need to provide it,Also getting an error message saying "www.testing.com’s server DNS address could not be found".






Why has this issue occurred?
The issue is due to A Record is not updated with www prefix and not pointed to your IP address under DNS Configuration, that means your domain with www prefix is not pointing to the proper IP address provided by HostingRaja,or it is not added. If you are using our virtual or cloud to provide many websites on a single IP address, you will also need to tell your web server about the alternative name for the site means you need to add testing.com as an alias for www.testing.com on your web space or apache configuration.
How to fix this Issue?
Steps to be followed to resolve this kind of issue:
Step 1: The first step is to check whether the name server of the particular domain is pointing to your IP or not , you can it using
https://intodns.com/
(Type your domain name and check whether it is having name server which is pointing to your IP.)

Step 2: If the nameserver are not pointing to the server then login to your UCP account >> go to DNS Zone Editor. >> select the domain name from the drop-down menu >> and click on Edit.


To add the A record go to the bottom and click on Add New Record >> enter the appropriate details >> click on save

Example:
Enter Hostname as ns1, TTL as 172800 and target as 45.113.136.168 which is your IP.
Again Enter Hostname as ns2, TTL as 172800 and target as 45.113.136.168 which is your IP and click on Save Changes.
Note:
Any DNS changes will take 24-48 hours to propagate globally.

Step 3: If the nameserver are pointing to the server also make sure that the A record for www is updated
login to your UCP account >> go to DNS Zone Editor. >> select the domain name from the drop-down menu >> and click on Edit.
Check if A record of www is updated if it is not updated then
To add the A record go to the bottom and click on Add New Record >> enter the appropriate details >> click on save
For Example:Enter Hostname as www and target as 45.113.136.168 which is your IP and click on Save Changes.
After you have added the record >> login to root access in the command prompt >> and type " service named restart "
Step 4: If you want to create a 301 redirect forcing all http requests to use either www.example.com or example.com.By default your website can be accessed with both www.example.com and example.com. Since Google penalizes this due to duplicated content reasons, you should restrict the access to either www.example.com or example.com. Some links may be outside of your website scope and/or the search engines may have already indexed your website under both addresses.
To create a 301 redirect check if you are having .htaccess file under public_html add the redirect rule in it or else create a new .htaccess file and add the below redirect rule replacing the domain_name with your domain name inside .htaccess and save it
<ifmodule>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^domain_name$ [NC]
RewriteRule ^(.*)$ http://domain_name/$1 [L,R=301]
</ifmodule>
Example1- Redirect example.com to www.example.com:
<ifmodule>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
</ifmodule>
Example 2- Redirect www.example.com to example.com:
<ifmodule>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?$ "http\:\/\/example\.com\/" [R=301,L]
</ifmodule>
Note:
>> Kindly check whether your domain name is pinging or not with prefix www using the command
ping www.example.com
>>Check whether your domain name is pointing to VPS Web Server or Cloud Based Server using the command:
dig example.com
If you need any assistance, feel free to contact our technical team members as they are available 24/7 via phone call, email, ticket system or call out toll-free no 1800-123-8642.