Error with opening with www and without www

6 replies
I'm facing a problem and need your help.

I have a website suppose example.com

When I open this by example.com then it opens correctly but when I open it with www.example.com then its showing "error 500- internal server error"



Same with posts example.com/post-url opens but www.example.com/post-url doesn't open.

How can I solve this?
#error #opening #www
Avatar of Unregistered
  • Profile picture of the author DIABL0
    Check your DNS setting and make sure there is a setting for www or you might try contacting your hosting provider if your DNS is through them.
    Signature
    How to Build LARGE EMAIL LISTS on a Budget and MONETIZE Like a PRO
    20+ Years Exp . . . . . . . . . . . . Email - CPA - PPL
    {{ DiscussionBoard.errors[11224022].message }}
  • Profile picture of the author Parveender Lamba
    I redirected my www.domain.com to domain.com and it's working but other posts are not working like www.domain.com/post-url not opening on domain.com/post-url

    what to do now?
    {{ DiscussionBoard.errors[11224090].message }}
    • Profile picture of the author Peter89
      Who's your hosting provider?

      If they run apache and .htaccess is allowed then you can easily control these redirects. Just add a file into your root directory called .htaccess with the following content:
      RewriteCond %{HTTP_HOST} ^www.example.com$
      RewriteRule (.*) http://example.com/$1 [R=301,L]
      This will redirect all www traffic to non-www with pathname.
      {{ DiscussionBoard.errors[11224180].message }}
    • Profile picture of the author DIABL0
      Originally Posted by Parveender Lamba View Post

      I redirected my www.domain.com to domain.com and it's working but other posts are not working like www.domain.com/post-url not opening on domain.com/post-url

      what to do now?
      You don't want to redirect.

      You want to edit the actual DNS zone file for the domain and add www to it. Then you won't have the problem you are having now.

      The easiest solution may be to contact your hosting company.
      Signature
      How to Build LARGE EMAIL LISTS on a Budget and MONETIZE Like a PRO
      20+ Years Exp . . . . . . . . . . . . Email - CPA - PPL
      {{ DiscussionBoard.errors[11224365].message }}
  • Profile picture of the author ChrisBa
    Sounds like there is something wrong with your .htaccess file
    {{ DiscussionBoard.errors[11224375].message }}
  • Profile picture of the author sunpeaks589
    Adjust the DNS settings for example.com. Make sure you have address records (type A records) for both example.com and www.example.com, with the same IP address
    {{ DiscussionBoard.errors[11225590].message }}
Avatar of Unregistered

Trending Topics