Hi there,
My domainname is not pointing to the same.
should point to the same, but these 2 are not.
Any help please to solve this issue ? I appreciate.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hello,
The problem you’re experiencing typically occurs due to DNS settings. Here are steps to make both
www.domainname.com
anddomainname.com
point to the same place:Check Your DNS Records: You need to have both an
A
record and aCNAME
record set up.The
A
record should pointdomainname.com
directly to your server’s IP address.The
CNAME
record should pointwww.domainname.com
todomainname.com
.This should be set up in the DNS management tool of your domain registrar or your DNS hosting service.
Set Up Your Web Server to Respond to Both Domains: On your web server, you need to configure your virtual host file to respond to both
www.domainname.com
anddomainname.com
. For example, in NGINX, you can setserver_name
todomainname.com www.domainname.com;
. In Apache, you can useServerAlias www.domainname.com
.Here’s an example of the DNS settings:
Replace
IP_Address
with your actual IP address.Note: DNS changes may take up to 24-48 hours to propagate across the internet, although it generally happens more quickly.
I hope this helps. Let me know if you have any other questions or need further clarification!
Best,
Bobby