Help with the best redirecting method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pimpware
    Confirmed User
    • Jan 2006
    • 1673

    #1

    Help with the best redirecting method

    Hi folks,

    I could bet my question is somewhere answered but the search function is not working.

    I have a domain.com wordpress blog with a couple of old sub-domains(niches), each one a wordpress blog.

    It happens that I want to get rid of almost all of those sub-domain blogs, and redirect them to the main blog, and my question is what is the best redirecting method?

    Thanks
    icq: 284494832
    realsexforyou.com
  • MakeMeGrrrrowl
    Grrrrrrrrr
    • Oct 2002
    • 4984

    #2
    Originally posted by pimpware
    Hi folks,

    I could bet my question is somewhere answered but the search function is not working.

    I have a domain.com wordpress blog with a couple of old sub-domains(niches), each one a wordpress blog.

    It happens that I want to get rid of almost all of those sub-domain blogs, and redirect them to the main blog, and my question is what is the best redirecting method?

    Thanks
    This is the one I use.

    https://wordpress.org/plugins/redirection/

    Comment

    • Marvin_AWB
      Registered User
      • Dec 2014
      • 62

      #3
      I would set up a 301 redirect. It bascially tells the search engines: "this site moved permanently" and is the standard procedure for what you are planning to do.

      You can use a WordPress plugin like Grrrrowl suggested or manually edit your .htaccess file. It's usually just a few lines of code.
      AdultWebmasterBlog.com - Tips, tricks and tutorials for adult webmasters.

      Comment

      • pimpware
        Confirmed User
        • Jan 2006
        • 1673

        #4
        Originally posted by MakeMeGrrrrowl
        MakeMeGrrrrowl thanks for your sugestion, that plugin looks pretty good but at this time I want to keep the plugin numbers at minimum for performance reasons.


        Originally posted by Marvin_AWB
        I would set up a 301 redirect. It bascially tells the search engines: "this site moved permanently" and is the standard procedure for what you are planning to do.

        You can use a WordPress plugin like Grrrrowl suggested or manually edit your .htaccess file. It's usually just a few lines of code.
        Setting up a 301 redirect with my .htaccess file would allow me to delete all stuff related with those blogs, even the sub-domains? Or do I have to keep the sub-domains active?

        Thanks
        icq: 284494832
        realsexforyou.com

        Comment

        • suesheboy
          Confirmed User
          • Nov 2002
          • 5211

          #5
          .htaccess for the win.

          I have made a htaccess redirect each sub domain by having a htaccess file in each sub domain.
          Adult Web Site Domain Names For Sale
          Adult Sex Toy Domain Names For Sale
          Tantric Delights, Sex Toys Blog, Tantric Sex Toys

          Comment

          • Marvin_AWB
            Registered User
            • Dec 2014
            • 62

            #6
            Originally posted by pimpware
            Setting up a 301 redirect with my .htaccess file would allow me to delete all stuff related with those blogs, even the sub-domains? Or do I have to keep the sub-domains active?
            No, you don't have to keep them active.

            Just a quick example:

            RewriteEngine On
            RewriteBase /
            RewriteCond %{HTTP_HOST} !^mydomain.com$ [NC]
            RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]

            This code would check that the address the visitor wants to access starts with mydomain.com. If not, let's say because the visitor wants to access mysubdomain.mydomain.com, there will be a 301 redirect to the main domain (mydomain.com).

            This means no matter which sub-domains the visitor wants to accesss, there will always be a redirect to the main domain. Therefore, it doesn't matter if the sub-domains are active or not.

            This solution is "quick and dirty" and only makes sense when you don't want to have new sub-domains in the future.
            AdultWebmasterBlog.com - Tips, tricks and tutorials for adult webmasters.

            Comment

            • Paz
              Confirmed User
              • Jun 2012
              • 457

              #7
              Actually the htaccess will probably put a greater strain on a busy server because every js, css, gif, jpg etc file will be processed by the htaccess file where as the plugin will probably be a lot more targeted.

              If you do go down the htaccess route I would leave the sub-domains up and empty apart from your htaccess but you could put everything on the main site and delete the sub-domains (as per AWB's suggestion above ).

              If you have a dedicated box or a VPS (ie you're not on shared) you have other options such as setiing up redirects in Apache, also I have an idea I did something similar via CPanel and it might be worth looking there too.

              Comment

              • pimpware
                Confirmed User
                • Jan 2006
                • 1673

                #8
                Originally posted by Marvin_AWB
                No, you don't have to keep them active.

                Just a quick example:

                RewriteEngine On
                RewriteBase /
                RewriteCond %{HTTP_HOST} !^mydomain.com$ [NC]
                RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]
                This code allow me to add some kind of exception? I want to redirect all but 3 existing sub-domains.
                icq: 284494832
                realsexforyou.com

                Comment

                Working...