• Hi,

    I just noticed that my wordpress site only works if I don’t put the “www”, if I type the URL including the www I get a message that says …
    Warning: Cannot modify header information – headers already sent by bla, bla… But if I omit the www it works just fine.

    The only thing I did last night is added a comment at the bottom of each of my theme files as suggested in this thread.

    I did this to see what file was used after viewed in a browser.
    Comments looked like this <!—[fileName]–>

    Any idea what could be cousing the problem? I know I could try to remove the comments but I’m not home at the moment.

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am having the same exact problem, except i’m getting the error when i omit the www.

    This occures when the DNS server doesn’t direct/redirect the www. properly, if you have control over the DNS make sure that the www is part of the CNAME and directs to the @ of the A record.

    If you do not have control over the DNS and you are on shared hosting, contact your hosting support to assist you with this.

    Some hostings control panels have the ability to checkmark the redirection itself, which you need to disable it disabling the www in the cpanel.

    As for fs_tigre’s issue, the cannot modify header information is because a blank line was probably coming from the functions.php file of their theme, @fs_tigre should switch to a different clean theme and see if the issue is the same, if it is then it could be a plugin, if it isnt the same and the issue is gone, then it is the theme itself, more then likely the functions.php

    Check your theme’s function.php before the top most <?php and the bottom most ?> making sure there are no blank lines or spaces before the <?php and after the ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘My site only works if I omit the WWW when I type my URL’ is closed to new replies.