Yet Another Cycling Forum

General Category => The Knowledge => Ctrl-Alt-Del => Topic started by: Valiant on August 16, 2019, 01:27:15 am

Title: Site within a site
Post by: Valiant on August 16, 2019, 01:27:15 am
So I run an online site, and I've just created another specifically for trade sales. So I'm wondering which is the better option in regards to seo etc. trade.myshop.com or myshop.com/trade


IIRC doing a subdomain acts as a completely separate site, whereas as a directory its better for joint SEO?
Title: Re: Site within a site
Post by: Diver300 on August 16, 2019, 08:17:37 am
Can't you have both?

Just have subdomain of trade.myshop.com and direct that to [directory that everything else is in]/trade, which is where myshop.com/trade goes to anyhow.http://

An example that I run is:-

http://caerwen.malin.me.uk/

http://www.malin.me.uk/caerwen/
Title: Re: Site within a site
Post by: drossall on August 16, 2019, 08:51:50 am
It's usually best not to present as two different locations, as this looks like duplicate content, which can get you down-rated. 301 redirect one to the other if you want to respond to both.

I did look into this a bit back for a more complex situation, where we were genuinely running different systems, and it wasn't necessarily easy to present one as a subfolder of the other. My understanding from then is that it makes little difference. Google generally recognises domains, so since both your variations are in myshop.com they'll get broadly equal ranking. Yes, trade.myshop.com is a subdomain and therefore https://trade.myshop.com/ is a separate site, but, like https://myshop.com/, it's still using the domain myshop.com

NB this is an area where it can be easier to think about things if you distinguish between domains (myshop.com) and Web sites/addresses/URLs (https://myshop.com/)...
Title: Re: Site within a site
Post by: Valiant on August 19, 2019, 12:19:57 am
Right so tried it both ways, and in both circumstances the original site takes precedence and shows page cannot be found. Any ideas why this might be? I don't have any categories or pages with the same name.
Title: Re: Site within a site
Post by: drossall on August 19, 2019, 09:23:59 am
Well it depends on the detail of set-up. There's the issue of routing your browser's page request to the correct server IP (which does appear to be happening because of the response you're getting). Then, as you're probably running two servers (instances) - myshop.com and trade.myshop.com - on the same underlying machine/IP, you need to be using host headers (in received page requests) to work out which one should respond.

If you were wanting to accept requests for both servers, but redirect those for the latter one to myshop.com/trade, you'd want to be rewriting the requests received so that requests to trade.myshop.com could be served from myshop.com (again, because they are different addresses). That rewrite might be happening unintentionally, given what you describe, but it's hard to tell. If you have set up two servers, then it's probably true that there isn't a /trade page/folder in myshop.com and hence the error? An easy test would be to put a temporary page there with a message, and see whether that gets served.

So how are the two server (instances) configured? And are they Apache or IIS?
Title: Re: Site within a site
Post by: Valiant on August 21, 2019, 12:46:33 am
Single dedicated server, apache on siteground, both sites running wordpress. /trade did have the site in, so should have loaded that but didn't.