5 ms·
or the subdomain goes to an advertiser server.
by adriancr 6y ago
or the subdomain goes to an advertiser server.
- hashkb 6y agoYeah... we're all too lazy to relay our data through our own backends. I recommend this to clients but there's always some killer analytics feature that requires the JS integration.
- jay_kyburz 6y agoOh, I didn't realize a subdomain was not considered 3rd party. So soon we'll see adnetwork.mydomain.com and www.mydomain.com. I think we should just make cookies only work when the domain matches exactly.
- devlopr 6y agoYou would see mydomain.com/adnetwork then.
- jay_kyburz 6y agoCan browsers look up a different server addresses to send requests to that way? I didn't think that's how DNS worked but I'm no expert. Advertisers can't trust content people to forward requests because it would be too easy to fake them.
- mikeiz404 6y agoNo I don’t think so. DNS only works on the domain part of the url. However a server like nginx can be set up to proxy requests matching a specific url pattern to another server. This would be a bit more work than adding a DNS entry and referencing that though.
- adriancr 6y agoOr setup cdn to redirect certain paths to the adserver and mark those paths as nocache
- kmeisthax 6y agoThe reason why subdomains work is that you can make the root domain go to your own site, while the subdomain goes to your ad provider. If you use a CNAME it's literally just a matter of publishing another DNS recod and you're done. Moving to a subdirectory requires setting up a reverse proxy on your existing infrastructure, and keeping it up to date every time your ad network switches domains. Hell, on a lot of platforms you don't even have the ability to reconfigure the server in such a way as to proxy through an entire ad network, so you'll have to use a platform or technology specific plugin if available. That's why the ad industry used third-party domains in the first place, BTW - it's a zero-setup solution. Subdomains are minimal-setup; subdirectories are a huge hassle.
- ComodoHacker 6y ago>That's why the ad industry used third-party domains in the first place Another reason is ad provider doesn't have to trust first party, if ads are served from their server. I'm not sure which reason is more important.
- devlopr 6y agoYou wouldn't need to. Let's say they gave you a php script (any server side processing language) you could place it anywhere and it would download new ad content and show it as a first party ad. Easier than changing a cname.