Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Anonymous asked in Computers & InternetSoftware · 1 month ago

Why does my website lead to something different whenever I put the www. in front of it and how do I fix it?

2 Answers

  • BigE
    Lv 7
    1 month ago

    First, make sure that and have the same A (IP) record.  Most people assign an A record to the domain that is the same as the web server's IP, just to allow things to forward to it.  You can only add an A record to the domain record;  adding a CNAME is illegal, so you can't CNAME it to a different server because that CNAME's the whole domain!

    Now if they have the same IP, then are you virtual hosting?  That is, are you running multiple instances of the web server?  If you are, it usually separates the web instances by the URL.  There is a default instance (sometimes) and then ones that match the typed in URL servername.  So might be a different match and might be the default.  So when you type in http://xxx/

    it matches the XXX to the virtual hosting's servername (apache, but the concept is the same for other web software).

    This is  how you can have multiple web servers on a single IP.

    Finally, you can do a rewrite or redirect to your preferred format in most web software.

  • 1 month ago

    It could happen, you have to do a 301 redirect (using SEO Yoast if you use it on WordPress, or whatever else you use); another way is a direct editing of the .htaccess file. Redirect means from the wrong URL to the right one. Moreover, you have to use a canonical tag, to choose the canonical (means the right version) of your URL; you can do that simply editing the HTML file or using a plugin (Yoast SEO or others).

Still have questions? Get your answers by asking now.