Pointing domain from one cPanel account to another - wordpress

I manage a hosting server using WHM. I have two cPanel accounts on this server, one for exampletest.com (account name is exampletest) and one for example.com (account name example). We have a Wordpress site that was working well at exampletest.com but we keep running into problems when we try to migrate it to example.com. I believe it has to do with one WordPress plugin that doesn't migrate well.
So we had the idea to simply take the example.com domain and point it to the exampletest cPanel account, then update the domain for WordPress in the database. However, one potential issue I can see is that we have many active email addresses on the example account. I fear that associating the example.com domain to the exampletest account will break the email addresses.
Keeping the above in mind, I have a couple questions:
Will associating the example.com domain to the exampletest account break the emails? If so, is there a workaround (moving the email addresses to the new account somehow?)
Is there a better way to go about doing this that I'm not thinking of?

The best way of transferring your wordpress site would be to copy the files, create a database user with the same login details and import the database. Wordpress shouldn't be able to tell the difference.
One way would be to assign a static IP address to exampletest and point example.com's A record to that IP.
Due to the way WHM's DNS and port binding is set up it will not let you set up the same domain on two seperate accounts.
You could treat www. as a seperate subdomain and add the subdomain www.example.com to exampletest as an addon domain and remove the www A record from example first. Redirect all web traffic from example.com to www.example.com or use another sub-domain such as www2.
Another option would be transfer the emails, you can either use the transfer tools in WHM > Transfers or use http://imapsync.lamiral.info/

Related

What DNS TXT records do I need?

I have a website hosted on a cPanel, I need to change it to Cloudflare nameservers and then the dns records so the main domain will be pointed to a vps ip address and the mx records keep using cPanel records. The problem is I found a lot of TXT records created by the cPanel and I don't know what I should take or leave since they look so random.
My cPanel DNS Zone Editor:
Notice:
I have two active domains on my cPanel, the first is the main domain which I would like to transfer to point to my vps, the second should keep working on the cPanel. but I found related txt records in the first domain, looks like this caldav._tcp.DOMAIN2.tn.DOMAIN1.tn. (check screenshot)? Why does it even exists in the main domain records?
I just need to move the main domain and keep the mailing service with cPanel! Which TXT records should I create on Cloudflare after I change the domain nameservers?
If you are planning on keeping your eMail where it is but only plan on changing the web site to use CloudFlare you should really leave ALL of these TXT records as they are.
SPF = Sender Policy Framework (which is a list of servers or services that can send eMail using your domain name)
DKIM = Domain Key Identified Mail (is a form of anti-alteration system to stop eMails being altered in transit)
DKIM is unique to each domain and subdomain so if you have a eMail service on the second domain you should have an SPF & DKIM record for them too.
As for the bottom rules I don't know what they are.

How to change URL of Pivotal Cloud Foundry web application

I have just pushed a Spring Boot / VueJS application to Pivotal Cloud Foundry and was wondering how I change the URL for the website?
When I pushed the application they gave me a URL of http://crdeckhelper.cfapps.io/
I went to godaddy and bought a domain of crwardecks.com
How do I make my application run on crwardecks.com?
I currently have godaddy re-routing the person to the URL that cloud foundry generated for me, but this is not the behavior that I want.
I have read the documentation on Pivotal but for some reason it confuses me. I have also searched for this on the web but wasn't able to find a good resource.
There's a couple things you need to do.
Add your domain to Cloud Foundry. Run cf create-domain.
https://docs.run.pivotal.io/devguide/deploy-apps/routes-domains.html#private-domains
Map a route under this domain to your app. Run cf map-route <app> <domain> ....
https://docs.run.pivotal.io/devguide/deploy-apps/routes-domains.html#map-route
At this point, you'll have the domain and route set up in CF, but nothing is sending traffic to CF.
To send traffic to your CF, you need to make an adjustment in your DNS records. Again, there's a couple of options.
You can route traffic for just one subdomain to the app, by creating a CNAME record that points from your custom domain to the domain assigned by CF. Ex: CNAME: www.example.com -> crdeckhelper.cfapps.io.
You can route traffic for all subdomains with a wildcard. Again we use a CNAME record but this time we use a wildcard. Ex: CNAME: *.example.com -> *.cfapps.io (or you could use some subdomain, like *.sub.cfapps.io).
Both are described more here. Also, cfapps.io is part of Pivotal Web Services. If you use a different provider then your shared domain will be different.
At this point, you should have traffic routing to CF & CF should be routing traffic to your specific app. Your done & you can stop reading, unless you are trying to map a root domain to your app.
There's an edge case around root domains (i.e. example.com, not www.example.com), because DNS CNAME records don't work for a root domain. Some DNS providers support ALIAS or ANAME records, which work like a CNAME record for root domains. If your provider does, you can give it a try (see your DNS provider's doc for instructions on how to use). If not, see if your provider supports URL forwarding. Many DNS providers will automatically redirect HTTP traffic on the root domain to a sub domain you specify, like example.com -> HTTP 302 -> www.example.com.
For more on root domain setup, see Configuring DNS for Your Registered Root Domain at the following link.
https://docs.run.pivotal.io/devguide/deploy-apps/routes-domains.html#domains-dns
As a last resort, you could use an A record, but you need to be very careful because your CF providers may not have static public IPs, rather their IPs can change. If you use an A record and your provider's IP changes, traffic will stop flowing to your app & you'll need to update your A record to point to their new IPs (you can get your provider's IPs by running dig <app-dns> or nslookup <app-dns>. If you go this route, make sure you have monitoring to quickly catch when IPs change.
Hope that helps!

Same Domain WordPress login on different server wp-admin

Quick Question.
A guest house was bought by the original owner and scenario as follows.
The Website for that guesthouse is on its own Hosted WordPress installation at the current host
The login address would be https://Example/wp-admin
I re-created that user account on our hosted WHM as I need to transfer the website and Domain to myself.
Can I login to the newly created WP-admin on my server while the A record is Pointed to the current hosts IP?
Example
Current Host
Example/WP-admin
IP:46.0.0.0
Example
New Host
Example/WP-admin
IP:76.0.0.0
How Can I login to the WP on the new host if the DNS is pointing to the IP:46.0.0.0 (Current Host)
FYI - most will ask why don't I point the A record, that's because the current host does not have the logins for the Cpanel, nor are they answering calls
THANKS,
hope this makes sense in the way I phrased it.
On your local machine you can change the hosts file to point Example webstie to 76.0.0.0 and then you can flush the dns cache and web browser cache. From now on Example website will point to 76.0.0.0 for your computer only. If you have a Windows machine and admin access, you can modify the hosts file under c:\Windows\System32\Drivers\etc\hosts ( change c partition to the partition that you have installed your windows on, if its different then "c" ) then you can add following line:
76.0.0.0 example.com www.example.com
Please make sure you flush the dns cache and clear the web browser cache afterwards.
If you want the whole world to see Example website from 76.0.0.0 you would have to change the A record.

how to create sub-domains

i am going to create some sub-domains on my website.
when i create a sub-domain i must define a directory that sub-domain will refer to newly created sub-domain. but i want a different solution.
i want to detect when a user enters a URL , which sub-domain is used and then do some operation for each special sub-domain.
for example if website user entered a.mysite.com
i extract "a" sub-domain from URL and then without redirecting webpage i load some data in page.
please help me how i do these,on both web-server and localhost?
In general your application doesn't care about the host name, so you have to configure your IIS to handle all requests.
Production only: Create a wildcard DNS record for your domain (e.g. *.domain.tld)
Your IIS site should have no explicit bindings, so that ALL incoming requests hit this application (other sites should still work fine!).
After this you can check the HttpContext.Current.Request.Url and extract the requested subdomain.

Can I have 2 different DNs zones?

I have a wordpress blog hosted on blog.company.com, and now I'm trying to create a DNS entry on Heroku to get mycompany.com but I get the following error:
! could not create zone; already registered on Zerigo to a different account?
What am I missing herE?
Thanks
At a guess there's already an account on Zerigo that has the zone mycompany.com registered to it.
You can't (easily) have a domain hosted on two seperate DNS providers, you're best option would be to find the DNS host of blog.mycompany.com and setup a subdomain on the mycompany.com domain, eg www as a cname entry to proxy.heroku.com and then add www.mycompany.com as a custom domain on your heroku application.
The fact that you're getting the message about a duplicate zone, is Zerigo already hosting the DNS for blog.company.com perhaps? In which case login to the control panel for that (the zone is company.com) and add a record for your site.

Resources