Support » Developing with WordPress » Blog Folder Creation

  • tigershroof

    (@tigershroof)


    I am creating a website johndoe.com and when I create a blog, it is created at johndoe.com/blog.Is there I can create the blog link as blog.johndoe.com and use it on a single install of WordPress. I do not want to create multi-site and want to use one single install with single them with the above structure.

    If I create a sub-domain i.e. blog.johndoe.com, then it creates its own folder in the hosting account, which I do not want. Could not find this answer anywhere,so wanted to check if it can be done and if yes, kindly advise how.

    * Johndoe.com is a hypothetical name for the website.

Viewing 1 replies (of 1 total)
  • 1wdtv

    (@1wdtv)

    This is simply subdomain forwarding.

    You can achieve this (depending on your DNS host) two direct ways:

    1) You can use a snippet of code in your .htaccess file (regardless of host) on the primary domain of johndoe.com

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(?:www\.)?blog.johndoe\.com$
    RewriteRule ^(.*)$ http://www.johndoe.com/blog$1

    2) For most DNS hosts (like GoDaddy), this is a WYSIWYG option in the dashboard. See, eg: https://www.godaddy.com/help/forward-a-subdomain-19977

    3) You do NOT need to first create a physical site on blog.johndoe.com in order to forward the subdomain. This is a DNS solution, not a website file solution 😉

    Cheers!
    spence
    1wd.tv

Viewing 1 replies (of 1 total)
  • The topic ‘Blog Folder Creation’ is closed to new replies.