Point multiple domains to single page, with unique button based on source domain

Point multiple domains to single page, with unique button based on source domain - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Point multiple domains to single page, with unique button based on source domain error on your web browser. Problem :


I'm a software dev, but I'm green when it comes to web development and domain management.



Let's say I've registered some domains:




  • apples.example

  • bananas.example

  • cherries.example



...and [with a separate company] I'm on a "premium Shared Hosting" plan (includes "unlimited websites, unlimited parked domains, 100 subdomains").



I want to have all the domains point to a single website, so that users who enter any of the domain names all see the identical page except for a button encouraging the user to add the item named in the domain to their "shopping cart" or whatever.




Example:




  • if a user navigates to apples.example, they are brought to a page that includes a button Add apples to cart.

  • if a user navigates to bananas.example, they are brought to the same page, except the button action is now Add bananas to cart.




I am being told that this is not possible with a single page, and that therefore I'll need to add each domain to the host one-by-one via cPanel's web interface, and in the process create subdomain pages for each individual one.



I'm new at this but I still find it very hard to believe that there's no easy way to do this.



Thoughts?


Solution :

First you need to point all domains to same folder. So any request will end at same script. Its different on own server, and rented hosting.

Detect domain from server variables, url on your preferred scripting language and do make changes to output depending on that.

Without scripting its not possible to do so by same file/script.



If you have problems with first step, for example hosting provider not allowing it, then you can copy same script to each site ftp, and do it after any changes to script again. Actually better to change hosting, to what allow domain aliases.]



In general: all domains are aliases for same server/site. Script on site detects which domain requested.



Update: If you have own ip address and (virtual) server, with web-server software configured to listed on given ip address for any domain name, you could setup unlimited domain names to be resolved to your server ip. Domain name requires parking, at same or other hosting company, no matter where.

Virtual server are cheap, but cost more then usual shared hosting.

Since you are new to web, search for virtual server company what configures and maintain everything for you, I mean web server software setup.


We hope that this article has helped you resolve the domains, redirects, url error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=