Author Topic: subdomain vs. domain  (Read 5596 times)

0 Members and 1 Guest are viewing this topic.

griever

  • Sr. Member
  • ****
  • Posts: 457
    • View Profile
subdomain vs. domain
« on: June 08, 2007, 08:26:19 am »
Maybe someone who knows how search engines work can help me out here.  I switched my domain names in February/March.  Not surprisingly, traffic has dropped (but it's slowly rebounding!).  However, search engines still favor the xepher.net subdomain over my real domain, sometimes by a page or so of returned search results.  Any idea how I can fix this?  Or is it just a matter of time?
"You can get all A's and still flunk life." (Walker Percy)

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,325
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Re: subdomain vs. domain
« Reply #1 on: June 08, 2007, 11:34:31 am »
Well, when doing what searches do they favor it? Searching for "chanpuru" comes up with the domain first. Searching "Griever's Anime" comes up with the subdomain that includes the word "griever" in it. Perhaps you should consider an apache redirect? If people visit via the subdomain, it'll send a "file has moved" redirect to the full domain name. Google takes those into account I believe. Also, it's likely a lot of people are still linking to the subdomain URL, more than the chanpuru one, so google things it's a better result (As google has no idea they're the same site.)

griever

  • Sr. Member
  • ****
  • Posts: 457
    • View Profile
Re: subdomain vs. domain
« Reply #2 on: June 08, 2007, 12:00:16 pm »
Oops, sorry, when they do a straightforward search for "anime episode summaries".  Most of my affiliates and link exchanges have updated their links to the chanpuru address and I've submitted a sitemap with every page with the chanpuru address starting every link.

Thanks for the apache redirect idea...I'll start looking up how to do it. :)  I have a PHP redirect for the old grieversanime.org domain, but I guess that didn't work.
"You can get all A's and still flunk life." (Walker Percy)

Xepher

  • Techsmith
  • Administrator
  • *****
  • Posts: 4,325
  • Illegitimis non carborundum!
    • View Profile
    • Xepher.net
Re: subdomain vs. domain
« Reply #3 on: June 08, 2007, 12:25:46 pm »
Code: [Select]
RewriteCond %{HTTP_HOST} !^chanpuru\.org$ [NC]
RewriteRule ^/(.*) http://chanpuru.org/$1 [L,R=301]

Put that in a file named ".htaccess" (note the leading dot) in your public_html folder. What it'll do is read the HOST used by the browser to connect to the site, if it's not EXACTLY "chanpuru.org" it'll redirect the request to chanpuru.org, with a status code of 301 (which means "moved permanently.") This is just modifed from some old stuff I had laying around, so it's not tested recently. Try it, let me know if it works or if you have problems.

EDIT: Note that when I say, "exactly" it means www.chanpuru.org will get redirected as well. That shouldn't be a problem, so long as that's how you want it. If you want softer filtering, remove the caret (^) from in front of chanpuru.org on the first line, as it marks "line starts here." Then it won't alter anything where the host ENDS with "chanpuru.org" If you want the www. prefix to be the default, it might be wise to change the second line to www.chanpuru.org too. (Me, I hate typing needless w's.)
« Last Edit: June 08, 2007, 12:35:16 pm by Xepher »

griever

  • Sr. Member
  • ****
  • Posts: 457
    • View Profile
Re: subdomain vs. domain
« Reply #4 on: June 08, 2007, 12:52:59 pm »
EDIT: Fixed it! (For once, I do things right!)
Code: [Select]
RewriteCond %{HTTP_HOST} !^chanpuru\.org$ [NC]
RewriteRule ^(.*) http://chanpuru.org/$1 [L,R=301]
Removed the slash in the RewriteRule ^ bit.  Thank you!

And I just got your title.  And had to play the mp3.
« Last Edit: June 08, 2007, 12:59:20 pm by griever »
"You can get all A's and still flunk life." (Walker Percy)