Forums

http to www. Need the www to be permanent (7 posts)

  1. marinos
    Member
    Posted 5 months ago #

    Hey guys.. I'm sure it's been answered before but I just couldn't find a straight answer.
    I need to have my site with WWW permanently, including all the pages

      I'm using WP and Pagelines
      It's a new site, so I have no pages or data yet
      It's a single site

    Can I just change the "Site address (URL)" ? Is there any way to do this without messing with HTaccess? Would a permanent 301 redirect be the solution?

    Thanks

  2. ChristiNi
    Member
    Posted 5 months ago #

    Hello marinos,

    I can't speak for how Pagelines might work with redirects but I can answer your question regarding redirects. You will want to set your WordPress Address (URL) and Site Address (URL) in your WordPress dashboard to the www version of your site.

    Next, if your host uses cPanel, simply set up a redirect through your cPanel for the non-www version of your site to redirect to the www version of your site, and also select the Wild Card Redirect option. Make sure you select the "Do Not Redirect www." option when creating this redirect to avoid a redirect loop.

    If your host does not use cPanel or a similar site management tool, you can try adding this to your .htaccess file, replacing yourdomain.com with your actual domain name:

    RewriteCond %{HTTP_HOST} ^yourdomain.com$
    RewriteRule ^(.*)$ "http\:\/\/www\.yourdomain\.com\/$1" [R=301,L]

    Hope this helps!

  3. marinos
    Member
    Posted 5 months ago #

    Hi Christi, thanks for your reply.
    I tried to change the WordPress Address (URL) and Site Address URL by adding the www in front of both and lost access to the site. Then I re-installed WP in my host GoDaddy to be able to access the site again. Any idea what went wrong?
    Regarding cPanel, it seems that GoDaddy has that only for dedicated hosting. Mine I believe is shared.
    GoDaddy DOES have a redirect feature in the settings. Should I use that?
    I've also downloaded a plugin in WordPress "301 simple redirects", so that's another option.
    I'm confused as to what is the relationship of the three different redirect options.

    I hope I get some help. Sorry to pester, but I'm an amateur and I'm trying to figure all this out by working knowledge. It's frustrating cuz I'm a marketer and I worked on developing many complex websites from the front end of them, and I know exactly what I want to achieve, I just don't know how to do it :)

  4. ChristiNi
    Member
    Posted 5 months ago #

    Hello marinos,

    Sorry you're having trouble redirecting over www. It's hard to say what went wrong without knowing what specific errors you received.

    When you re-installed your site, what did you set the WordPress Address (URL) and Site Address (URL) to be? If you set them as www during your re-install, you shouldn't need to change anything else in your WordPress settings. If not, you'll need to change that either through the dashboard or one of the methods outlined here:

    http://codex.wordpress.org/Changing_The_Site_URL
    (I usually find the wp-config.php method to be the easiest.)

    I'm not completely familiar with how GoDaddy servers handle redirects, but I did find this information from their help center:

    http://help.godaddy.com/article/5120

    Take note of Step 7 in those instructions. You will want to set instances without www to be redirected. There's no need to redirect www back to itself and could cause a redirection loop.

    It shouldn't be necessary to use both the redirect feature in your hosting account and the 301 simple redirects plugin. In fact, they could interfere with each other. Also, that plugin is really geared towards people who are migrating a site to WordPress and will not be keeping their same site structure.

    Hope this helps!

  5. songdogtech
    Member
    Posted 5 months ago #

    @ChristiNi; You're making things way too complicated. No need for .htaccess, redirects in Cpanel at GoDaddy, etc.

    @marinos. Simply add www to both the Site address (URL) and the WordPress address (URL) in WordPress settings. Once you save the settings, you may get kicked out and have to login again, and you may experience one redirect. But after that, your complete site will have the www prefix.

    Before you do the above, deactivate the redirection plugin, any redirects you set in GoDaddy, and delete the rewrite block if you added it to .htaccess, etc.

  6. ChristiNi
    Member
    Posted 5 months ago #

    My apologies marinos & songdogtech, this didn't seem to work for me yesterday without the redirect. I could still pull up the site without www. Obviously I needed to clear my cache to properly test this. Simply adding the www to the Site URL and WordPress address redirects the non-www properly now.

  7. marinos
    Member
    Posted 5 months ago #

    THANK YOU guys.
    It's working now. I've used @songdogtech 's solution and it's fine.
    Didn't even have to clear the cache. Strangely enough, it was my first guess and when I tried it it kicked me out fatally. Now for some reason it WORKS.
    Happy New Year.
    Marinos

Reply

You must log in to post.

About this Topic