• So, I’ve decided to create a subdomain to host my blog on. Here’s the current configuration. I have the main domain, example.com, as my front landing page. It still hosts all my blog posts and content, however you can only access the blog posts if you get it in a google search result. I created blog.example.com and exported/imported all my content to this site. Everything shows up and works great. Now, is there an easy way to disable or redirect everything on example.com to the content on blog.example.com?

    Anyone had to do anything like this before, is there an easier way?

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Please, please, please post real URLs.

    The domain will only be a landing page. Is that right? Or will there be other non-WordPress content? If it just the landing page it should be pretty easy to set up a 301 redirect in .htaccess. If there is other content, it could get tricky.

    Thread Starter tylersmiller

    (@tylersmiller)

    Oh sorry about that.

    Okay, original domain is https://www.tylersmiller.com. I want the new blog domain to be https://blog.tylersmiller.com. Blog URL already has all content. I want any google search results to tylersmiller.com to redirect to the respective article on blog.tylersmiller.com.

    Is this possible? Thanks!

    You didn’t fully answer my question. What, if any, content is going to be on https://www.tylersmiller.com? It should be easy to redirect all traffic but it sounds like you only want to redirect some traffic. I need to know which traffic you are redirecting and which you aren’t, if I am going to try to help.

    I also want to do it but with folder to move only the posts to blog prefix and use the default permalinks example.com/blog/?p=123
    but with sub-domain it’s not possible

    Thread Starter tylersmiller

    (@tylersmiller)

    Sorry about the confusion. The way both domains are now, is how I want things. So on blog.tylersmiller.com, any images etc still point at tylersmiller.com/wp-content/etc. I’m fine with keeping my uploads on tylersmiller.com. Right now, anytime you want to find a blog article, you have to find it via a search engine result. That points to tylersmiller.com/blogarticle. I would like tylersmiller.com/blogarticle to redirect to the same article on blog.tylersmiller.com/blogarticle.

    Essentially I would be deleting everything on tylersmiller.com if this can work.

    At this point, would it be easier to do a WordPress move of all content directories to the new subdomain and then delete everything from tylersmiller.com and wait for search engines to repopulate content from the new subdomain and not worry about redirects?

    Thanks again for your help on this.

    Ok. That is progress. ??

    Do you have WordPress installed at blog.tylersmiller.com also, or only at tylersmiller.com? … it actually looks like you do.

    So, can just move stuff and wait for a re-index. That is the easiest but not the best.

    You need to set up a 301 redirect. There are plugins that will do this but the overhead of a plugin has never seemed worth it for something you can do in two or three lines in an .htaccess file. I can probably get pretty close to the right several lines by guessing but let me test it later today and I’ll get back to you. This is second best, but adequate.

    Best is to go ahead and leave your images where they are and set up a cookie free domain for them. Like so: https://www.xpertdeveloper.com/2011/07/wordpress-cookie-free-domain/ This will probably make the .htaccess rules more complicated though.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Redirecting’ is closed to new replies.