How to do the domain acts like another domain? - server

I want to do that:
http://foo.example.com -> http://customdomain.com
http://bar.example.com -> http://anotherdomain.com
...
It's like Tumblr or Blogger custom domain using. My user's can create a website, these sites serve in my subdomains. However, if user wants to set custom domain for your site, then http://userscustomdomain.com actually will open http://foo.example.com but everyone can see the domain of http://userscustomdomain.com
How can I do that?
Thanks!

Your users should make Cname records that point to your domain, for example
www.usercustomdomain.com CNAME foo.example.com.
When that is set up, you need to make your application listen to the customers hostname.
Cheers!

Related

How do you verify user-owned subdomains in Facebook?

As part of the upcoming changes to Facebook Ads, you now must verify ownership of your domain name.
We operate a SaaS platform where user content is hosted on subdomains (myaccount.example.com etc). We need these users to be able to verify ownership of their domain so they can track their own events. We have enabled them to add the meta tag on their domain, and this verifies okay.
<meta name="facebook-domain-verification" content="codefromfbhere" />
However, the problem is, when you go into 'Events manager' -> 'Aggregated event measurement' -> 'Configure web events', it shows me the root domain instead of the subdomain I just verified (e.g. example.com instead of myaccount.example.com).
This is possible, as Leadpages has achieved the same goal. When you add in a Leadpages subdomain, you're able to verify it via meta tag, and it shows the subdomain in the 'Web event configurations' area.
I don't see any extra headers that they have provided or anything else that would enable this.
How do you mark subdomains as independent from the eTLD+1?
I wanted to chime in with the perspective of someone who works for Facebook. For most businesses, even ones that host pages for other businesses, Aggregated Event Measurement without anything extra is the correct solution.
Advertisers who do not own their own domains will not be able to verify the domain for the purpose of event configuration in Ads Manager. Advertisers may consider purchasing their own domain to continue running their campaigns uninterrupted, or moving toward link clicks/landing page views for campaign optimization and reporting. We are currently investigating other solutions for this use case but do not have any additional information to share at this time.
For a very small number of businesses already on the Public Suffix List (PSL) subdomains will be able to get data as if they were a root domain. This is because being on the PSL basically makes the root domain name act as if it was a TLD (such as “co.uk“ or ”gov.au“). In almost every case it does not make sense for sites to request to be added to the PSL as this dramatically changes how the Public Suffix listed domain name will function.
The PSL process is intended only for platform providers that provide subdomains for large numbers of small businesses which really ought to be treated as though they were in fact separate domains.
The Public Suffix List is not useful, nor intended to be used as a means to gain additional subdomain events reporting. Adding a domain name to the PSL means that there will be total cookie separation between subdomains and that cookies will become disabled on the root domain. If you a domain gets added to the PSL you'll not have much control for that site itself. For example, if you have a /login page on that domain. This may not work as it does today if you proceeded with a PSL addition, as cookies may get disabled on the root domain.
It’s also important to note that browsers will enforce the behavior described based on their own update cadence of the PSL. Some browsers don't update their lists more regularly than bi-annually. This means that if you're on the list and a browser updates their copy of the list, and you later decide to not be on the list, there may not be an easy way to back out the effects; it's not as simple as submitting another request to get taken off of the list.
More information can be found at Facebook’s help center article here.
[Update Mar 19 2021]
Facebook just announced they will be supporting the Public Suffix List for domain verification and event configuration. This means that merchants using a registered domain on the Public Suffix List will be able to use that domain for verifying and configuring their top 8 events on the domain. For example, if myplatform.com is a registered domain on the Public Suffix List, then Jasper, a merchant with the subdomain jasper.myplatform.com, would now qualify as an effective eTLD+1 and would be able to verify "jasper.myplatform.com" and use it to configure their top 8 events in the web events configuration tool.
Read more here:
https://developers.facebook.com/docs/sharing/domain-verification
[Original Answer]
For the upcoming changes for Apple iOS 14.5, you can only verify root domain, which is example.com in your example in order to setup the web event configurations.
The only way you can do this is provide your client's a way to buy/setup their own domain on your service.
You may watch the webinar recording here
https://www.facebook.com/business/m/sessionsforsuccess

Correct structure for custom domain feature for SAAS users

I am building a Saas platform (lets assume domain is www.saas.com) where user have unique subdomains such as user1.saas.com, user2.saas.com etc. And give them a feature to add their own custom domain.
To add custom domain, users define cname for app.saas.com and A record for public id in of my app.
Everything is working fine if cname and A record is defined correctly by users. But i have two concers about this:
To host my app, i used cloudways and select digital ocean servers. But if i want to move from Digital Ocean to AWS at some point, then public ip is going to change. So custom domains wont work until users change their A record.I wonder if is there a better way to give custom domain feature to user instead of adding A record? (I am not sure if cname and a record is the correct way for this feature)
Let's assume user1 is defined own domain for user1.saas.com. When i go to user1.saas.com, it is also working. I think, i should redirect this url to custom domain if it is defined. I wonder if this is a correct way?
Thanks in advance
Anil

Github page redirects to custom domain

I have Github Pages Site setup at doshisid.github.io. But it gets redirected to sid.sh. I have one another domain which points to the same GitHub page and it works fine (doshisid.com). But the default domain provided by GitHub doesn't. I can't figure out how is the default domain getting redirected to a custom domain.
whatever domain you want in there; inside the repo create a new file CNAME and then add the domain name like www.xyz.com .This will solve your problem probably.

How do I set up a domain name to redirect to another URL and then check referrers from that domain?

I'm running a print campaign and have bought a specific URL to try and measure the efficacy of that advert.
I'm using cPanel and Google Analytics.
I want people to type in the new, advert specific URL and be redirected to my actual, live domain name and I would like it to show up in Google analytics as a referrer so I can track how many people visit that website address.
I haven't a single idea how to do this properly. i've set it up as an addon domain in cPanel, and have also set it to redirect to my main URL from within cPanel, but at first glance in "real time" and "traffic sources" it just says "direct", but I want it to show this URL.
So to sum up, I want people to type in a URL, it then redirect and for it to show up in analytics as a referrer, by name. Thanks in advance!
I've done it, and here's how I did it:
I set the domain name up as an addon domain on my cpanel account.
Then I created a .htaccess in the root of that subdomain, with the following content:
# Permanent URL redirect
Redirect 301 / http://www.DomainName.co/?utm_source=Domain-Name.co.uk&utm_medium=mediumName&utm_content

Google Apps: verify domain ownership using CNAME

I understand CNAME is an alias to another record. Since I am using melbourneIT for my domain name, when I set up Google Apps, I need to verify my domain name ownership through CNAME record change.
However when I see page: http://support.google.com/a/bin/answer.py?hl=en&answer=142005#CNAME (please tick "I want to verify using a CNAME record"), I am totally confused at what information to use in order to create the CNAME record for this verification purpose.
Please see below for the information from http://support.google.com/a/bin/answer.py?hl=en&answer=142005#CNAME:
Host Name/Alias Value/Destination
Custom URL: www ghs.google.com
Verification: googlefffggghhh12345 (your unique string) google.com
If my domain name is mydomainname.com, what should I put into my CNAME record (the value for HOSTNAME and POINTS TO, as in my DNS management panel shows)?
It's confusing because it looks like two entries. I think you want to use the second set of criteria for verification. So you'd enter the googlefffggghhh12345 as the alias(or host), and it would point to google.com.
You might want to do both or alternatively do mail as a cname and point it to ghs.google.com. You'll want to do that eventually anyway.
The cname, www pointing to ghs.google.com, is consistent with telling your domain host to check to see if there's a webpage setup in google sites and send people there. If there isn't one, and there isn't a sitemap within apps for one, I think the domain would just return to current hosting.