TransWikia.com

Show contents of third party page on subdomain without changing URL

Webmasters Asked by eswan18 on December 23, 2021

I’m very inexperienced with DNS (forgive me for misusing terminology here) and am trying to configure a setup for a podcast I host. What I want is for https://feed.example.com to actually send users to https://mypodcastprovider.example/mypodcastfeed – so that I can submit the former URL to podcast directories and should I ever switch podcast providers, I can just update my redirection settings and not deal with all the podcast directories.

Can https://feed.example.com silently serve up the content of https://mypodcastprovider.example/mypodcastfeed?

I have tried to research this and have found lots of examples of pointing a subdomain to a different page on the same domain, and also of course I know I can send back an explicit HTTP redirect to the new page, but I’m concerned that won’t play nice with podcast directories (frankly I’m not knowledgeable enough to be sure).

One Answer

You cannot achieve this through DNS alone. There are two options:

Get cooperation from your podcast provider

If your podcast provider is able to host your subdomain for you, you could get the content to appear there. The proceedure would be:

  1. You point DNS for your subdomain to their server (mypodcastprovider.example)
  2. They configure their server to show your feed content for that subdomain

If they are unwilling or unable to cooperate and configure their server to do this, it won't work.

Use a reverse proxy

A reverse proxy is a web server that doesn't have its own content. Instead, it dynamically fetches content from another site and republishes it. If you run a reverse proxy on your feed subdomain, your server will appear to visitors to host the content from your feed provider. In reality, when a visitor requests content from your feed subdomain, your server will fetch it in the background from your feed provider and relay it to the user. To make this work you need to:

  1. Add your feed subdomain to your hosting. This is usually done as an add-on domain, or if you run your own server by configuring a virtual host.

  2. Ensure that proxy modules are enabled on your web server

  3. Configure the proxy. In .htaccess with mod_rewrite this could be as simple as:

       RewriteEngine On
       RewriteRule (.*) https://mypodcastprovider.example/mypodcastfeed [P] 
    

Answered by Stephen Ostermiller on December 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP