Cross domain restrictions and subdomains - cross-domain

Is there a cross domain policy restriction for subdomains?
If I have an application on paint.xxxx.com which is manipulating images from image.xxxx.com, are there any cross domain problems?
I'm asking these questions, because I'm considering putting a proxy on a subdomain.

yes the cross domain restriction applies for subdomains.
The solution is to put
document.domain = "example.com" ; // whatever your domain name is
in the top of the js file(s) for both the parent domain and the child domain
Google Document.domain and cross site and there should be a better explanation but I've had the same issue and that is what worked for me.

Related

Point sub domain to root AND redirect main domain

I have
'website.com' and 'newwebsite.com', both on LAMP environment.
I need
website.com redirecting to newwebsite.com
AND
old.website.com pointing to root of website.com
I have full control of both hosting and DNS records.
I can't figure out the best solution without creating a loop !
There are two choices here: redirects, or DNS records. If you do it with redirects it means the user will see that they have been forwarded elsewhere. If you use DNS, the user will not be aware of the deprecation of the old websites.
For this reason, I would use HTTP redirects for this task.
If you wanted to go the DNS route then simply have an A record for newwebsite.com and CNAMES for the others that point to it.

Azure CDN using root domain solution

I have a concern with our CDN as we are planning to apply custom domain. I understand the part that it is not possible to map a CNAME record to a root domain, such as contoso.com. I want to ask for a workaround, let us say yes we already assigned it to www.contoso.com. But people now adays do not use the www subdomain anymore and will just type constoso.com in the URL address bar and therefore it will just return a 404 because it is not mapped making as lose potential customers. What is your suggested solution or workaround for this?
Some DNS hosts allow creating CNAMES for root domains (ANAMES).
If your DNS host doesn't allow that then you can try to use subdomain redirection (like simple node.js app hosted on azure). Not the best solution but I'm not sure if other exists.
The work around is to use the cdnverify CNAME feature with A record.
CNAME : cdnverify.constoso.com -> cdnverify.constoso.azureedge.net
A record: constoso.com -> x.x.x.x
After all verification is complete, the CNAME can be removed. It worked for my domain.
(source: https://arlanblogs.alvarnet.com/adding-a-root-domain-to-azure-cdn-endpoint/)
There is currently no solution for this, except the described workaround when your domain-provider supports this.
There is a feature request on Azure for this problem:
https://feedback.azure.com/forums/217313-networking/suggestions/31221439-cdn-allow-root-domain-for-custom-domains

Using naked domain with blogger.com

I am trying to add a custom domain to my blogspot blog. But it is not allowing me to add the naked domain. Is there a way we can use the domain example.com with blogger.com instead of www.example.com?
No, there is no way for the final url to remain naked.
But you can set a redirect inside the blogger domain settings.
Edit the domain
Check the redirect naked to www box.
There used to be a bug which allowed you to attach the naked domain to Blogger by adding an extra space in front of the domain while adding it in Settings ( As you see detailed in this article - http://mystady.com/2011/01/solved-blogs-may-not-be-hosted-at-naked.html ) Also, using this bug, few people did successfully attach their naked domain to Blogger (like the site mentioned above as well as blogs like http://thehackernews.com/ )
But that bug was later fixed and there are currently no known workarounds to link the naked domain with Blogger

How can I create a second level domain name?

If I have a domain www.exemple.com how can I create second level domain ?
For exemple how can I create :
Www.client1.exemple.com
Www.client2.exemple.com
...
Thank you!
This will largely depend on who your domain name provider is. but basically the client1 part of www.client1.example.com is a subdomain.
'Most' DNS providers will allow for the creation of subdomains but not all do.
Once you have created a subdomain then the www part of that is just another host
If you are aiming to have a system where you substitute anything for client1 you might be able to use a www..example.com record. Again if your provider supports that (though they should do, it is standard DNS syntax) You would add the record www. and it should match www.$anything.example.com This is useful if you have clients with subdomains instead of profiles and you just want to point them all to the same server.

Where should a canonical domain name be enforced?

Our client would like to use just one domain name for their site to prevent diluting page rank in search engines.
For example, stackoverflow.com is the domain name they always use. If you type in www.stackoverflow.com you get redirected to the non-www version, as this is their choice for their domain name.
Where should this be done?
At the application server level (ex in IIS, set up a site and have it issue a permanent redirect to the proper domain name
At the application level
I don't like #1 as it means I have a bunch of extra sites set up just for redirecting. I don't like #2 as rewrite rules do affect performance.
thanks.
Do it at as low a level as you can possibly do it. Your application shouldn't know about its root domain name.

Resources