SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard
    Join Date
    Nov 2003
    Location
    United Kingdom
    Posts
    2,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What should I do? I really don't know the best way when changing my subdomains? Help!

    Hi,

    I have a subdomain like: products.domainname.com and another one like webdir.domainname.com.

    I had these when I first started doing websites.

    I have a website on each of these domains that is popular and is getting alot of traffic from the search engines.

    I now want to change the products.domainname.com to shopping.domainname.com and the other webdir.domainname.com to dir.domainname.com

    What do you think the best solution will be?

    Is there a way so that I don't have to move all of my website files from the old sub domain account and insert them onto the new sub domain account? Could I use some sort of redirect, which is not breaking the Webmaster Guidelines / TOS at Google as I don't want to use redirects and then get banned.

    Could I use redirecting, 303 redirects or something?

    Please advise and help.

    Thanks!

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    A 301 redirect is what you want to use. But keep in mind that no redirect is perfect and chaning those URLs may result in lost rankings.

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2003
    Location
    United Kingdom
    Posts
    2,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So do I have to actually set up a new sub domain and move all of my files onto that sub domain and then do a redirect or do I just keep my sites on the subdomain it is already on and then do a redirect so that it looks as if it is on a shopping.domainname.com domain rather than the products.domainname.com domain.

    What it is, I don't really have to change none of this, but then I have a uk site where I use shopping.domainname.co.uk and dir.simplysearch4it.co.uk. I have these two sections on my domainname.com site, but with using different sub domains. So I have a feeling that when I become big, nearly as big as Google and Yahoo. Cough, lol. Then people may wonder why the uk site has different sub domains for the same sort of content and they may type in the wrong things to look for the information.

    So do you think it will be best to not worry and to leave the sub domains as they are or should I change them?

    I have also looked at other sites, and they normally use dir. and shopping. for their subdomains for this type of content.

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Keep your files where they are. Mod_rewrite basically always you to use one URL to refer to files located at another URL.

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2003
    Location
    United Kingdom
    Posts
    2,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So how could I use rewrite so that I can make it look as if the files is hosting on shopping.domainname.com rather than products.domainname.com.

    Also, do I put the re-write rule in the products.domainname.com domain or do I have to set up the shopping.domainname.com domain and then use the 303 redirect or rewrite rule.

    Also, will doing it this way be alright with the search engines as I would not want to get banned.

  6. #6
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,423
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by john278
    So how could I use rewrite so that I can make it look as if the files is hosting on shopping.domainname.com rather than products.domainname.com.
    That's a question for the Apache forum. I'll mosve this thread there.

    Quote Originally Posted by john278
    Also, do I put the re-write rule in the products.domainname.com domain or do I have to set up the shopping.domainname.com domain and then use the 303 redirect or rewrite rule.
    Fairly certain you do not need to create the shopping subdomain. Our Apache gurus will confirm them or not.

    Quote Originally Posted by john278
    Also, will doing it this way be alright with the search engines as I would not want to get banned.
    It is search engine friendly for sure.

  7. #7
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    j278,

    When you redirect a domain, it WILL show in the location bar - there is NO way to prevent that (except to hide the subdomain in a framed page but SE's won't like that).

    The answer to your second question lies in the simple fact that subdomains can be co-located with the main domain ... or NOT. With that, it becomes obvious that you must put the .htaccess in the {HTTP_HOST}, i.e., the subdomain. If it's co-located with the main domain (rather than a subdirectory), then it's a moot point.

    So long as you 301 the redirection (stymiee likes Redirect 301, I like RewriteRule with the R=301 flag for the additional control), SE's should appreciate the notification of the changed URL and NOT ban/demote your pages.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •