Mobile app version of vmapp.org
Login or Join
Cugini213

: Is redirecting a subdomain to point to a folder good practice? I have a blog which can be accessed at http://mysite.com/blog/ I would like to access it like this because I think it looks

@Cugini213

Posted in: #Subdomain #Url

I have a blog which can be accessed at
mysite.com/blog/

I would like to access it like this because I think it looks cleaner
blog.mysite.com

I did some reading on domains, subdomains, and redirects and have created a subdomain with the desired URL and re-directed it to the blog path.

Is this a common set up? Is there a better way to accomplish what I want to do?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Cugini213

2 Comments

Sorted by latest first Latest Oldest Best

 

@Goswami781

Yes, this is a common set up and is perfectly OK.

The internets don't care what directory your site is in, even if the site you are talking about is the root domain e.g. mysite.com as long as the document root is set up properly.

For example, in my hosting if people are going to have multiple sites, having the primary domain in public_html and other sites sitting hanging off that directory is pretty untidy. Instead I make a dummy primary domain e.g. mysites_home.com and then a subdirectory for each domain, then point the document root of the domain to its directory.

This is exactly what you are asking about and, as I said it is common and OK.

Your panel should allow this and it will work transparently and instantly.

In cpanel it looks like this

10% popularity Vote Up Vote Down


 

@Nimeshi995

You are right that it is a cleaner set-up. However, you cannot redirect the sub-domain to the /blog directory and have it operate as though it is on the sub-domain that I can see. If you are creating a sub-domain not intending for your blog to operate on the sub-domain, then I am not sure why you would do that.

I agree that blogs are cleaner as a sub-domain. If that is what you want to do then I would just redeploy your blog to the sub-domain and create a blanket redirect to the sub-domain from the old blog directory to redirect traffic and search. However, there may be SEO implications to consider before taking on this task. For example, sub-domains are seen as separate sites by search engines and perform on their own. If a blog is integrated into the site for engagement purposes, you may lose that and any search traffic to your blog may not translate to the site and engagement can be lost. It is possible to to have a blog on a sub-domain and still have excellent engagement of course. I am just warning you that there may be more to consider before you jump all in.

Personally, if I were creating a blog, I would put it on a sub-domain because that is just how I like it. I would have to work to stitch the blog to the site and vice-versa.

Now create a good plan and get busy.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme