Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Subdomains and domains for navigational aids using redirection

         

matt621

11:35 pm on Sep 21, 2014 (gmt 0)

10+ Year Member



Hello,

On our site we use subdomains and domain redirection as navigational aids.

It's much easier for people to remember thing.example.com instead of example.com/cart/script.cgi?thing or thing.com to redirect to example.com/cart/script.cgi?thing

We have been doing this for 10+ years.

However, recent changes have made me afraid of it.

That I am aware they are all 301 redirections.

But I think I figured out what I did wrong several months ago. I was updating the site to use all relative urls in anticipation of going over to an all SSL site. But I'm wondering if some of these domains or subdomains created massive duplicate content unintentionally.

Does know the answer to this? If not is there a place on google to ask such a question and get a real answer?

Thank you.

[edited by: brotherhood_of_LAN at 12:57 am (utc) on Sep 22, 2014]
[edit reason] used example.com [/edit]

aakk9999

3:12 am on Sep 22, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



To understand it better:

On example.com you would internally link to URL example.com/cart/script.cgi?thing which would then do 301 redirect to thing.example.com?

Then on URL thing.example.com would have internal link example.com/cart/script.cgi?another-thing which would do 301 redirect to another-thing.example.com ?

And currently all your URLs are absolute because of this?

matt621

3:33 am on Sep 22, 2014 (gmt 0)

10+ Year Member



No, the other way around.

We use redirections two ways:

http://thing.example.com redirects to example.com/cart/script.cgi?thing

For example we'll email a customer the url http://thing2345.example.com a special url that shows the products that will do what they are asking about. or we'll redirect http://thing.example.com to the category in the shopping cart for all our "things."

The 2nd is domain redirection.

http://domainname.com redirects to example.com/cart/script.cgi?thing

My mistake is that most all our urls were absolute. However to make testing for https:// vs http:// we changed many of our urls to relative urls.

When we did that, I think that is what caused the problem.

So let's say we had thing.com and we redirected it to mainsite.com/cart/script.cgi?thing but somehow it hit a relative url. then every click after that was now thing.com/blah, blah, blah.
Or we have a lot of typo domains on our main site and I think they were all setup as alaises for the main domain. Before when we had absolute urls there was no problem, but when I changed to relative urls, that's when the duplicate content would be generated.


The reason I realized my mistake was that we had HUGE traffic on the SSL site. WTF? I was trying to understand what was going on there. I thought it was massive ddos or some really good fortune or really bad fortune about a zillion abandoned carts? But I think I know what it was.

I had all relative urls in there and google came in on thing.com (into the secure shopping page) and it reindexed the entire site under the new domain name, via secure server.

Our site was indexed under our regular domain name on a non-secure url.

So I think google saw that and figured it was some sort of spamming. It was not, it was me doing two things at once, but not realizing the effect it would have.

So what I did was verify EVERY domain is now a 302 redirect to absolute url.

What I'm still worried about is two things:

how to clean out the index of duplicate content

and 2

I'm worried about the subdomains.

http://thing.maindomain.com pointing ( via 301) to http://maindomain.com/reallylongurl...

I'm hoping that is still okay to do.

I logged into our webmastertools page and there is no information there about duplicate content or spamming or anything of that sort. So I don't know for sure that is what happend, or maybe if it did, would Google tell us?

Thanks!

[edited by: brotherhood_of_LAN at 4:07 am (utc) on Sep 22, 2014]
[edit reason] delinked [/edit]

matt621

3:56 am on Sep 22, 2014 (gmt 0)

10+ Year Member



writing that email reminded me of another domain. we have wwwdomain.com which we "parked" at domain.com, so I went in and made that a redirection too.

I did not know about the canonical domain tag and we did not have that and so taking out the absolute urls and replacing them with the relative urls along with not having the canonical domains is what caused this mess.

matt621

4:36 am on Sep 22, 2014 (gmt 0)

10+ Year Member



I just checked my webmaster tools under url errors and I'm seeing I think what is evidence of what I said above. I'm seeing errors trying to find

cart/cart/something.pl?....

there is no cart/cart/...

I'm also seeing cart/index.htm, but index.html would be in the home directory not the cart directory.

So I think this confirms my suspicions.

Or they could just be my mistakes. :) But because there are so many I think it's the former.

aakk9999

12:24 pm on Sep 22, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



OK, I understand now. Generally it is not a problem if you use "nice" URLs in brochures/emails and these redirect, but internally you are linking to URLs that do not redirect. This redirection should be 301 and not 302.

With regards to your problem, when you changed your URLs should be root-relative, that is, they should start with /

For example:
href="/cart/something.pl?..."
and not:
href="cart/something.pl?..." which appears you have and which then created cart/cart/something.pl URL.

With regards to index.html, does index.html exists in the /cart/ folder?
Or is /cart/ a virtual folder (only in URL, not physically on the server?)
If index.html does not physically exists in the physical /cart/ folder, then what does your server returns? Is it 200 OK and shows index.html from the root folder? Or is it 404 (which it should be if index.html does not exist in /cart/ folder). This may indicate issues with your .htaccess or with URL Rewrite module your CMS is using.

matt621

5:31 pm on Sep 22, 2014 (gmt 0)

10+ Year Member



This redirection should be 301 and not 302.


I believe they are all 301. Is there a way to check? some site that will show you the code before the redirection occurs?



With regards to your problem, when you changed your URLs should be root-relative, that is, they should start with /

For example:
href="/cart/something.pl?..."
and not:
href="cart/something.pl?..." which appears you have and which then created cart/cart/something.pl URL.



Yes, that was my mistake. I believe they are all fixed now. I just put everything back to absolute urls. How long do you think it'll be before google makes note of my corrections?


With regards to index.html, does index.html exists in the /cart/ folder?



yes, there is. but it's just a redirection.


<HTML>
<HEAD>
<TITLE> </TITLE>
<meta http-equiv="Refresh" content="0; url=cart.cgi">
<head>
<!-- Mimic Internet Explorer 9 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" >
</HEAD>

<script language="javascript1.1">
<!-- Hide
location.replace ('cart.cgi');
// end hide -->
</script>

</HTML>




Or is /cart/ a virtual folder (only in URL, not physically on the server?)




it exists, see above.


If index.html does not physically exists in the physical /cart/ folder, then what does your server returns? Is it 200 OK and shows index.html from the root folder? Or is it 404 (which it should be if index.html does not exist in /cart/ folder). This may indicate issues with your .htaccess or with URL Rewrite module your CMS is using.


I think you properly identified the underlying issue was my html mistake, ie =cart/... not =/cart/...

Thanks!

Robert Charlton

8:29 am on Sep 24, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hmmm... a meta refresh redirect is unexpected here. Without thinking about it much, I had expected server side redirects.

Just quickly to provide some additional food for thought, I don't believe there is a consensus on how meta-refresh redirects are treated, but here are two threads that go into problems that might be encountered using them.

Google's JohnMu had suggested you should avoid them if at all possible, but this was a while back, and I raised some questions about how universal his recommendation was...

Meta Refreshes - how does Google treat them?
Sept 2010
http://www.webmasterworld.com/google/4206453.htm [webmasterworld.com]

Avoid meta-refresh and JS redirects - Google's JohnMu
June 2010
http://www.webmasterworld.com/google/4160708.htm [webmasterworld.com]

Keep in mind that these are both old threads, from 2010, and that Google might treat such redirects differently now.

Robert Charlton

8:38 am on Sep 24, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



PS:
I believe they are all 301. Is there a way to check?

Normally, I'd user a server header checker to check redirect status, but meta refresh redirects aren't server side and I don't think that the status would be communicated to a header checker.

matt621

6:17 pm on Sep 24, 2014 (gmt 0)

10+ Year Member



Thanks. Actually I found a site that does it:
<removed link to redirect checker>

I just wish they had a bulk list option.

MOST all of them turned out to be 302 redirects. So I changed them all over to 301 redirects. I'll have to wait and see if it makes a difference in our traffic.
.

[edited by: Robert_Charlton at 7:00 pm (utc) on Sep 24, 2014]
[edit reason] removed link, per forum Charter [/edit]

Robert Charlton

8:17 pm on Sep 24, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



matt621 - Sorry to remove your link. Our Google Forum Charter [webmasterworld.com...] doesn't allow New Users to link to external SEO tools.

I can't comment on how the tool you used interprets meta refresh redirects, but, as suggested in the posts I reference above, you should avoid using meta refresh redirects whenever possible.

Note also that, whether meta refresh or not, it's bad practice to include urls in your navigation that will then be redirected. The urls in your navigation should be the destination urls. I'm not exactly sure whether you have that problem, but when I saw "meta refresh" in your posted code, I made the assumption that you may have that problem.

FYI, WebmasterWorld has a set of free tools [freetools.webmasterworld.com...] that you might want to explore. You can find the "free tools" link in the upper left corner of all pages on WebmasterWorld. (There are a lot of tools).

For what you're trying to check, I think you probably want the "Search Engine Friendly Redirect Checker" [freetools.webmasterworld.com...] ...From the main tools page, it's in "Webmaster Tools" section, which is the fifth section down. I haven't used this tool, and I can't tell you whether it includes meta refresh. Again, I'd be skeptical of any tool which evaluates how a search engine at a particular time in history is going to interpret a meta refresh redirect.

Note also that we have a "Check HTTP Response Headers" tool, for a fairly complete header report, and also a "HTTP Response Status Code Check Tool", which simply reports the response code of a known url.

matt621

11:13 pm on Sep 24, 2014 (gmt 0)

10+ Year Member



Hi,

We don't use meta redirects at all, at least not that know of. The girl who does the shopping cart may have something in there, I guess that's something we'll have to check into.

We use subdomain redirects because it just makes maintaining the site so much easier. For example we use http://contact.domain.com for the link to the contact page. Over the last 10 years we've had at least 5 different scripts in there, but it's only one redirection we need to do to update the entire site anytime we change it. Ditto for product moves and updates, etc. Also on our site we carry many parts. 4000+ and so it's sometimes hard to find stuff. But if everyone knows they can goto thing.domain.com and thing2.domain.com to find the category they are looking for it's really helpful. And then there is the specificthing.com domains which redirect to the shopping cart that sells that specificthing.


Frankly I'm surprise more people don't use this method. We like it and the customers like it. And Google claims its all about the user exerperience... So ?

Sorry about the link I did not know about that rule.

[edited by: aakk9999 at 11:11 pm (utc) on Sep 25, 2014]
[edit reason] Unlinked example [/edit]

aakk9999

11:35 pm on Sep 25, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Looking at your index.html example, it uses meta refresh instead of server side redirect. If you are hosted on Apache, it would be better to use .htaccess to redirect index.html to the root of the folder. There are many examples of how to do it in the Apache Forum [webmasterworld.com].

I am not entirely sure I understood what you are doing on your main domain. From what I understood, on your main domain you are internally linking to correct URLs and not to subdomain? I mean, internal link does not go via redirect? If you hover over the internal link, the URL shown is not a subdomain version? As for subdomains, you use your format thing.example.com for brochures and printed matter?

What about external links - how do people link to your site's internal page, do they link to URLs that go to subdomain and then are redirected or do they link to the URLs that are on main domain?

Frankly I'm surprise more people don't use this method.

This method makes very difficult to understand your site structure and to understand what are important pages of your site and which not so important.

Subdomains are considered a separate site for ranking purpose and you could have one subdomain penalised and the other not (although Google is not clear whether they treat it as one site or as a separate site). Some months ago there was a discussion on subdomains vs domains which may be worth reading:

Two Different Subjects: Subdomains vs Subdirectories? Google 2014
Apr 17, 2014
http://www.webmasterworld.com/google/4663754.htm [webmasterworld.com]

Also, I do not think that URL http://contact.example.com/ is any easier to remember than URL http://www.example.com/contact

matt621

4:15 am on Sep 26, 2014 (gmt 0)

10+ Year Member



Okay, here I can give you real work examples.

Let's look at Amazon.

You goto amazon. com

But if you just want music, you goto music.amazon.com

but if you want books, you goto books.amazon.com

That's what we are doing (And been doing it long before amazon did.)

That's ONE part of the question. I'll leave it at that for now so as to not confuse the issue.

I used the link checker previously mentioned and both are 302 redirects. Okay so if Amazon is using 302 redirections, and amazon is very high in the serps, it would seem to indicate 302 is not a problem even tho google says to use 301 redirections.