Web Solutions to Meet Your Needs

    22 Comments

  1. great tips, thank you

    Sara

    August 3, 2010

    • No problem, Sara – glad you found them useful!

      Ursula

      August 24, 2010

      • When i opened the .htaccess file it looked like this ..where to change ?
        Can you help me please

        # Use PHP5 Single php.ini as default
        AddHandler application/x-httpd-php5s .php

        # BEGIN WordPress

        RewriteEngine On
        RewriteBase /
        RewriteRule ^index.php$ – [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]

        # END WordPress

        Uttam B

        September 4, 2010

        • thank you….Sara
          Uttam

          Uttam B

          September 5, 2010

          • I have one more query…today only i installed wp on my second domain . my question do we have two .htaccess file or only one for the two domain …

            thanks
            uttam

            Uttam B

            September 7, 2010

          • You would have a .htaccess file for each domain. Notice that your second domain has its own folder, so if you’re looking at your files via FTP, it’s likely in /public_html/subdomainaddress (where “subdomainaddress” is your second domain). This is your secondary domain’s folder, and other domains you create would also need their own .htaccess file.

            Each .htaccess file located at the root folder of your domains is specific to that domain. You don’t need the above code for your primary domain, but you will need it for all secondary domains, and yes, each one will have its own .htaccess file.

            Hope that answers your question! :)

            Ursula

            September 7, 2010

  2. Yes. This takes care of that annoying secondary.primary.com bluhost sub-domain issue. However, there is another problem with bluehost. They only allow you to place the document roots for your secondary domains inside the document root of your primary domain. Therefore, your content of your secondary.com is also served from http://www.primary.com/secondary-com/ (secondary-com is whatever you choose as the document root directory name when you add your secondary domain). This is not only an SEO issue bot a potential security risk for your site. I tried working around it by creating mod_rewrite rules in .htaccess for the primary domain, mainly to redirect requests for http://www.primary.com/secondary-com/ to http://www.secondary.com. Unfortunately they already placed some settings in the httpd.com that make those rules being ignored. I made numerous request to bluehost to do something about it, but their response was “Sorry, this is how our servers are configured!” They even suggested Taking my sites somewhere else “if I don’t like it”.

    Michael

    August 14, 2010

    • Hi Michael!

      That is a very valid point, and thank you for bringing it up! I had no idea that was also running in the background… I have a lot of subdomains on my account for various purposes, and I just tested a few of them out based on what you said (www.primary.com/secondary – you don’t even need the com), and it led me to each subdomain’s respective site!

      I agree that it is a potential security risk, but unless someone knows what domains you own, they wouldn’t really know to go to each respective folder.

      I’m assuming many of the shared hosts work the same way and that the search engines take this into account… at least I hope they do!

      Thanks for the comment!

      Ursula

      August 24, 2010

  3. No problem, Sara – glad you found them useful!

    Ursula

    August 24, 2010

  4. You’re absolutely right – other shared hosting providers work the same way, so the above instructions could also be used with them. Definitely does make web hosting easy and affordable! Glad to help! :)

    Ursula

    August 25, 2010

  5. That is also how it works on JustHost. Really makes web hosting easy. Thanks.

    John

    August 25, 2010

  6. Just add the lines I mentioned at the end… so:


    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    RewriteEngine On
    ## SEO REWRITE

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

    Make sure you then upload it and replace the old file (and also change “YourSecondaryDomain.com” to your actual secondary domain). That should work for you! :)

    Ursula

    September 4, 2010

  7. Thank you very much.

    Uttam

    Uttam B

    September 8, 2010

  8. No problem – glad I was able to help! :)

    Ursula

    September 9, 2010

  9. correct – one of our clients uses justhost and said he’s sticking to justhost coz it’s easy

    Guaranteed SEO Services

    September 14, 2010

  10. Do you know why this isn’t standard on BlueHost?

    I can’t say I like the fact that I automatically get a seconddomain.domain.com…

    And I toally agree on the duplicate issues.

    Do you know?

    April 20, 2011

  11. That’s a good question. I think it has to do with how BlueHost’s hosting works – additional domains on a hosting account are considered “add-on” domains, and you have one domain set as your primary domain. For example, if you want to use secure SSL hosting, this can only be done on the primary domain, not the secondary “add-on” domains. You would need a separate hosting account with the desired domain set as the primary to accomplish this, if the SSL was needed on one of the secondary domains. Basically, it’s a pain to be faced (no pain, no gain) if you want to keep your hosting costs down and host multiple domains on one account.

    WP Gal

    May 4, 2011

  12. Hi, I have a question… it may sound dumb..but I just wanted to clarify that both “yoursecondarydomains” lines are to be changed? thanks

    Juliette

    June 19, 2012

    • No question is dumb, Juliette! Yes, you will want to change both lines. :)

      WP Gal

      June 19, 2012

  13. I am not able to login to wp-admin after making changes to my .htaccess

    Priyank Vijay

    September 3, 2012

    • This may be because you’ve made an error, or you’ve tried to edit the file from the WordPress editor (which doesn’t always work). I’d recommend you edit the file via FTP. Hope that helps!

      WP Gal

      September 22, 2012

  14. Hey, this was exactly what I had doubts about. But I am not sure it would apply in my case. Perhaps someone can help me? My situation is as follows:
    1) I have an existing fully functional site since 7 years, it has a good PR and plenty of visitors. It is gringo-rio.com
    2) I want to move the domain to Bluehost.
    3) I am also moving the content to WordPress. I have already built the new WordPress site on another domain in Bluehost. See: http://therioforum.com/gringo-rio/

    I want to know the best practice for me to move the domain and set up the new WP site on it. Is the addon domain a bad idea? Does the problems covered in this article apply? If I set up a separate bluehost account, is it easy just to move the site I built to the new location without loss in functionality?

    Very thankful for any advice!

    Hakan

    PS I understand I have to create 301′s etc.

    Hakan Almerfors

    March 26, 2014

Trackbacks/Pingbacks

  1. Moving from Wordpress.com to Wordpress.org | ArtistThink - [...] some of these terms confusing? No worries! Check out this dude, He gives some basics of vocab and things …

Tell us what you think!

%d bloggers like this: