Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 166685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:08:28+00:00 2026-05-11T12:08:28+00:00

We are hosting many web applications for our customers. As is obvious they want

  • 0

We are hosting many web applications for our customers. As is obvious they want to use their own domains to refer to those applications, usually they want that any user that either type http://www.customer1.example or http://customer1.example goes to their web application.

The situation we are facing is that we need to have the flexibility to change IP addresses in the near future. And we don’t want to rely on the customer doing the A record change on their domains. So we thought that using CNAME records will work, but as we find out CNAME records will not work for the root domain.

Basically:

customer1.example IN CNAME customer1.mycompanydomain.example //this is invalid as the RFC www.customer1.example IN CNAME customer1.mycompanydomain.example //this is valid and will work 

We want to be able to change the IP address of customer1.mycompanydomain.example or the A record and our customers will follow this record which we have control over.

in our DNS it will look like:

customer1.mycompanydomain.example IN A 192.0.2.1 

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:08:29+00:00Added an answer on May 11, 2026 at 12:08 pm

    Thanks to both sipwiz and MrEvil. We developed a PHP script that will parse the URL that the user enters and paste www to the top of it. (e.g. if the customer enters kiragiannis.com, then it will redirect to http://www.kiragiannis.com). So our customer point their root (e.g. customer1.com to A record where our web redirector is) and then www CNAME to the real A record managed by us.

    Below the code in case you are interested for future us.

    <?php $url = strtolower($_SERVER['HTTP_HOST']);  if(strpos($url, '//') !== false) { // remove http://   $url = substr($url, strpos($url, '//') + 2); }  $urlPagePath = ''; if(strpos($url, '/') !== false) { // store post-domain page path to append later   $urlPagePath = substr($url, strpos($url, '/'));   $url = substr($url, 0, strpos($url,'/')); }   $urlLast = substr($url, strrpos($url, '.')); $url = substr($url, 0, strrpos($url, '.'));   if(strpos($url, '.') !== false) { // get rid of subdomain(s)   $url = substr($url, strrpos($url, '.') + 1); }   $url = 'http://www.' . $url . $urlLast . $urlPagePath;  header( 'Location:{$url}'); ?> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm severely annoyed with many shared hosting providers not enabling SoapClient support on their
We have Flex applications that connect to our ASP.NET 3.5 Web Applications and usually
Many of us have web and application servers that use plain TCP. Some of
There are lots of cheap web hosting services available, but many of the services
My webserver is hosting many apps whose path looks like http://example.com/app1/ http://example.com/app2/ ... I
My hosting company emailed me yesterday to tell me that they are upgrading Apache...
I use shared hosting so I can't access to shell. I have CronsController and
I have many Visual Studio 2008 web projects targeted at the .NET Framework 3.5.
I'm planning to use Solr as search server, and will develop own spider or
I have a web server hosting an HTTP chat application that works with long-polling.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.