the problem lies in your topleveldomains table
rows 1 and 3 are the cause
perhaps what you need is to run two queries to do the matching -- the first will check for any 2-part top level (e.g. qc.ca), while the second will check for any 1-part top level that weren't already matched by the first query
without subqueries, you'll need a UNION and for the second query you'll need a LEFT OUTER JOIN
however, there's still a problem
you say you want "toto" as the result, which leads me to believe that you don't care that two completely different sites were matched against two completely different topleveldomains if you only want to see "toto" once in the results
therefore you can use UNION ALL and skip the LEFT OUTER JOIN in the second query
does that make sense?