Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » Running WordPress » Web Hosting for WordPress »

[SOLVED] Missing my "www"??


  #1  
Old Mar 29, 2009, 07:56 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
I've been noticing something new/different.

I've always entered my website's address / URL as "www.hatchtown.com" the leading "http://" and trailing "/index.html" were always automatically inserted/provided by the browser and/or internet internal systems.

Lately (since switching to WordPress?), I'm noticing my site's URL shows up in my browser (usually Firefox) at JUST http://hatchtown.com even when I've entered the address with the www

What's changed?!
  #2  
Old Mar 30, 2009, 01:12 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You probably have a redirect from www.domain.com -> domain.com in your htaccess file, or directly in the webserver configuration file (less likely but possible).
It's a good thing to decide on one version, either domain.com or www.domain.com and then redirect both users and search engines to the preferred version. For the search engines it is better if a "301" redirect was set instead of one without "301". You should see something like "R=301" mentioned in your .htaccess file.
  #3  
Old Mar 30, 2009, 04:14 PM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
I looked at a couple of .htaccess files I found but did not see any mention of any redirect

I've kept a "legacy" file from my "old" website. It's in the root directory and it's URL as shown in the browser is "http://www.hatchtown.com/nostdir.html". Meanwhile, as soon as I click a link back into the WP installation I get URLs like "http://hatchtown.com/tools/misc-tools" (no "www").

Checking the WP Settings in the Dashboard:

WordPress address (URL) = "http://hatchtown.com/wp"

Blog address (URL) = "http://hatchtown.com"

We've always published our URL as www.hatchtown.com -- I think people expect a website to start out with the www. How do I go about getting the w's back?
  #4  
Old Mar 30, 2009, 07:24 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
If you change these

WordPress address (URL) = "http://hatchtown.com/wp"

Blog address (URL) = "http://hatchtown.com"

to

WordPress address (URL) = "http://www.hatchtown.com/wp"

Blog address (URL) = "http://www.hatchtown.com"

it should work if the web server is set to serve bot www.domain and domain from the same directory.

If not, you may have trouble getting to the site again after you made these changes. In that case you'd have to manually edit, with PHPMyAdmin or something else, in the WP database, in the table wp_options, the values of row 1 ('siteurl') and row 39 ('home')
  #5  
Old Mar 31, 2009, 06:01 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Quote:
Originally Posted by Flynn
...<snip>...it should work if the web server is set to serve bot www.domain and domain from the same directory.

If not, you may have trouble getting to the site again after you made these changes. In that case you'd have to manually edit, with PHPMyAdmin or something else, in the WP database, in the table wp_options, the values of row 1 ('siteurl') and row 39 ('home')
Okay! Now you're scaring me!!

Could this have anything to do with something GoDaddy might have done. At some point in the transition from my old html/table website to the new WP-powered one I spoke to GoDaddy tech help and I remember discussion of redirects. I don't remember the specific reason for my call to them.
  #6  
Old Mar 31, 2009, 07:10 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I suggest that you contact Godaddy again and ask them to configure a "301 redirect from domain.com to www.domain.com" instead of the other way round
  #7  
Old Apr 1, 2009, 02:43 PM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
I talked to GoDaddy, didn't get the impression the guy I had on the phone was a real expert on redirects, but he said there wasn't anything on their end which would be causing the disappearance of my "www."\

We looked at the contents of the .htaccess file that's in the root directory, but there didn't seem to be anything in there that would amount to a redirect:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
But now, having done just a bit of research I have learned that the above IS some kind of redirect. Since I deleted the old index.html file in the root is it necessary to have the above to force browsers to "grab" onto index.php in its absence?

I found these lines that are supposed to correct "canonical URL errors"
RewriteEngine On
RewriteCond %{HTTP_HOST} ^websitename\.com$ [NC]
RewriteRule ^(.*)$ http://www.websitename.com/$1 [R=301,L]
-- can I just add them to the existing .htaccess?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} ^hatchtown\.com$ [NC]
RewriteRule ^(.*)$ http://www.hatchtown.com/$1 [R=301,L]
</IfModule>
What do you think?

Last edited by Shepherd Jim; Apr 1, 2009 at 09:47 PM. Reason: I had new info about redirects
  #8  
Old Apr 2, 2009, 04:41 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I had to read up on this...

Since version 2.3 Wordpress does the 301 redirect for you. That means no 301 redirect with htaccess is required anymore

Since you don't seem to have an existing www.domain -> domain redirection with htaccess anywhere, the redirection is clearly caused through the Wordpress settings, see post #4

So if you want your site to run on www.domain.com, set

WordPress address (URL) = "http://www.hatchtown.com/wp"

Blog address (URL) = "http://www.hatchtown.com"

The

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

looks good however it is not required, and may somehow interfere with the 301 that WP already does.
  #9  
Old Apr 2, 2009, 07:54 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Thanks for the "reading"! I've been doing some research myself and it's fascinating to see some of the really useful things you can do using the .htaccess.

If I manage to do this without screwing it up, will there be an effect on Permalinks? Will I lose links to all our posts.

Last edited by Shepherd Jim; Apr 2, 2009 at 09:03 AM. Reason: spelling corrections / missing words
  #10  
Old Apr 2, 2009, 07:29 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You shouldn't loose anything. These are just 2 settings in the database
  #11  
Old Apr 5, 2009, 08:28 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
All is right with the world! ...well, at least in my little corner of it!

Both my websites now show the canonical URL "www" in the browser URL window. Wordpress is running in a subdirectory /wp/ but that doesn't show in the browser.

BTW: there's a setting in Google's Webmaster Tools where you specify whether you want Google to just look at your site's pages with or without the "www."

AND! ...there's an intense debate going on amongst the web technorati about "www": is it necessary? evil? useless?

While I plan to keep reading about all this, for the time being, I'm old-school and come from a time where the only REAL website had names that started with "www" and end with dot com -- anything else was suspect.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Change footer background on &quot;Page&quot; pages only Unca_Tim Post-Kicker, -Byline & -Footer 22 Jun 4, 2009 12:45 PM
[SOLVED] Adding &quot;share this&quot; plug in to post page...Possible? d_random Plugins & Atahualpa 2 May 19, 2009 02:47 PM
[SOLVED] Flynn: &quot;..default hard coded widgets..&quot; ?? Shepherd Jim Sidebars & Widgets 2 May 11, 2009 05:47 AM
[SOLVED] What are the &quot;rules&quot; about using special characters in page titles? Shepherd Jim Page & Category Menu Bars 4 Apr 7, 2009 07:03 AM
[SOLVED] How should top level &quot;button&quot; work on a menu bar? Shepherd Jim Page & Category Menu Bars 2 Mar 14, 2009 02:30 PM


All times are GMT -6. The time now is 05:21 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.