I had a question after my session at Microsoft Sinergija in Belgrade – how do I use this “*.cld.sr” domains from CloudShare with SharePoint 2013 public facing sites. Well, although the techniques of alternate mappings and web application extending are not new in SharePoint – they have been there since quite some years – let’s put it again all together, from the CloudShare Vanity URLs perspective.
When you order a CloudShare ProPlus subscription, you get something called “Vanity URLs”. Those are URLs on cld.sr domain, which you can use to publically access you CloudShare resources, whatever they might be. In this case, I want my SharePoint Team site to be accessible from the outer world through such an URL.
For start, let’s create a SharePoint web application, on a CloudShare-hosted SharePoint 2013 server (the same is true for 2010), on a port 2002 (you can use any port you like). I’ll use standard NTLM authentication, and all standard features.
After the Web application has been created, SharePoint will prompt me to create a root site collection in that web application, and I’ll do just that, based on the “Team” template.
My SharePoint team site will be internally accessible on the following URL: http://sp2013:2002/
As you see – this site is only accessible internally, from a local network. No external access is possible.
On the other side, log into your CloudShare account, and go to the “My Account” tab, and then “Vanity URLs” tab. You will see your CloudShare environment there, with the servers listed, and beside each server is a possibility enter an *.cld.sr domain of your choice, and declare it as a Vanity URL. Be aware, you can have only one Vanity URL at time, so if you have multiple SharePoint servers in your environment, you will need to chose to which one do you want to associate your Vanity URL.
I have 3 machines in my environment – AD, SharePoint 2013 and Windows 8, all belonging to the “AdisCloudShare” domain, with AD machine as the domain controller. I’ll associate my Vanity URL “testvanityurl.cld.sr” to the SharePoint 2013 machine:
Now, how do I associate a previously created team site on that machine, with a CloudShare Vanity URL I just selected?
There are two ways to do it. One way is to use so called alternate mappings. It’s an old technique in SharePoint, giving multiple mappings to SharePoint web applications – that basically means that a single web application will be accessible through different “mappings” (URLs). The advantage of this approach is that it is a fast and straight forward method, and requires no overhead on the server.
Second way is extending the web application. When you extend a web application, you expose the same content to different sets of users by using an additional IIS web site to host the same content. The advantage of this approach that you are not bound on the same authentication mechanisms, and same users as with your original web application – for example, your local AD users can use NTLM authentication, and for the partners, accessing from outside, you can use form based authentication. The downside is that it creates an additional IIS site…
Let’s look at the both ways how to assign CloudShare “Vanity URL” to the web application.
In the Central administration, go to the Application Management, and then click on the “Configure alternate access mappings”.
You see all existing alternate mappings listed here, among them is the “default” mapping for our newly created web application “http://sp2013:2002”.
Now click on “Add internal URLs” link above the mappings:
And add the Vanity URL you selected before (http://testvanityurl.cld.sr in my case), and choose the “Internet” zone.
Save the changes, and open the IIS manager. Find the web site on the port 2002 (our newly created web app), click on edit bindings, and look if the binding on “http://testvanityurl.cld.sr” at port 80 has been added. If it isn’t, please add it manually, as a new binding. Don’t remove the original binding on the port 2002.
Now, let’s try our vanity URL in browser – it should work.
Extending the web application
Let’s create another Vanity URL, which we will use in extended web application. Be aware that we will need to release the previous Vanity URL, used for Alternate Mappings approach. Remember, we can have only one active Vanity URL at time.
My new vanity URL will be testurl2.cld.sr
Now go back to SharePoint Central Administration, click on the Application Management, select our application on the port 2002, and click on the Extend Application button in the ribbon bar.
Since a new IIS site will be created, you will be prompted for some info. Let’s create it on the port 2003, and call it “Extended site – 2003”.
On the bottom of the extending the web site form, there are URL and Zone fields. Please enter your Vanity URL in the URL field, and choose the “Internet” as a Zone.
If you want, in the same form, you can configure From Based Authentication, or Trusted Providers (like Azure Access Control Service) for this new, extended web application. For the sake of simplicity of this article, I’ll just leave that alone.
Now, go back to the Central administration, and then go to the Application Management, and then click on the “Configure alternate access mappings”.
Both our mappings – the default one on the port 2002 and the new, internet zone mapping with new Vanity URL should already be present.
Now, go to the IIS Manager, and look for the Extended site on the port 2003 which we have just created.
Ckick on Edit bindings, and look if the binding with your Vanity URL on the port 80 is already present there. If not, please add it.
And again – works like a charm
Thank you CloudShare for this whole Vanity URLs!