Archived copy of A Swedish wolf in Norway

Miscellaneous technobabble from a Swede in Norway.

Site-specific preferences for subdomains

Published: 2006-11-17 09:11:58

Recently a question about how site-specific preferences in Opera 9 cascade down to subdomains was posted to the opera.general news group. Since there seems to be some confusion in the area, I thought I’d take the opportunity to clarify a bit.

Suffix matching

The site-specific preferences in Opera 9 does not only match on the host they were defined for, but it also cascades down to any host sharing the same suffix as the first domain. That is, if you set a site-specific preference for, it will also apply for and However, if you set the preference for, it will not apply to, since they do not share a common suffix. It will, however, apply to, should such a domain name exist.

This applies to all the domains you configure through the user interface. To make the lookup as fast as possible, it is not possible to disable this cascading effect.

Prefix matching

It is also possible to do prefix matching, which can be useful if you want to match a service that has domains under many top domains. You do that by adding an asterisk (*) at the end of the domain name when you create a site-specific preference for the domain. This means that you cannot use the page right-click menu, you will have to use the main preferences (Tools (or Opera) → PreferencesAdvancedContentManage site preferences) for this.

If you set up a site-specific preference for www.example.* this will match both and Please be aware, however, that it will also match, which might not be what you want.

Tags: browsers opera


I think you mean 'prefix' when you say 'suffix' and vice versa. ;)

edit: thanks EL :)


In the written sense yeah. But domains are ordered from right to left. So the prefix actually is the ".com" since that is the top domain (as was mentioned in the article)

semantics, whaddya gonna do?

I mean suffix and prefix as in what you enter is the suffix (the regular site preferences) or prefix (for the form with the trailing asterisk). I could perhaps have been a bit clearer, sorry for that.

prefix not supported? bad news...


if i wish aply a UserCSS to myspace? i'm lose many time setting to diferents pages.....

- - - - - - -

paginabrasileira: If you want to apply the same style sheet to all the sites, simply set it for "", it will then apply to all the sites you listed, using the suffix matching I describe in the blog post.

I'm sorry for replying to such an old article, but is it possible to use URL strings with wild-cards with the same freedom you have when defining URLs for blocking content?

Say I want to apply a user stylesheet to "", is it possible to apply a different stylesheet to "" by using this as a selector: ""? Or do I need to replace the forward slash with a wildcard, like so: "*something"?

Anyway, I tried both ways (and some other ways) of defining the URL in a new entry in site preferences, but none worked so far. I even doubt now if it is possible to do this. Can you enlighten me in this matter?

ernesteban: No, site-specific preferences only look at domain names, not full URLs.

Thanks, it was my doubt :)

This was originally posted on My Opera at
Please note that links may be outdated and any information included here may be obsolete.

← Översättningsförvirring | Opera Mini 3.0 out now → | Back to the post index | Back to the archive index | Peter's homepage