Converting the whole site to HTTPS create a basic problem, as Feedburner does not support HTTPS, it throws error. Here is an easy solution. You need not to fight with Nginx, Apache2 ‘s hundreds of difficult codes to pass only the feed URL to HTTP. More complex logics we will add, it can open up more trouble on the main server. All of us have one dot com and usually the corresponding dot net or dot org domain. We keep it as 301 redirected to the main website. Most of us have a B Grade host account – usually it is a Hostgator Shared Account. Quite obviously, not all website needs high end servers. Simple affiliate websites, project websites can work better on low cost $5 per month hosting. Converting the Feedburner subscribers to Feedblitz or whatever has extra charge. Why pay money to Feedblitz like service when we can use a simple method.
WordPress HTTPS and Feedburner : Easy Solution
Basically, we will copy the source code of the WordPress generated feed from HTTPS URL of main website, in our case it is :
1 | https://thecustomizewindows.com/feed/ |
and create a file named feed.xml
and save it. Against our that 301 redirected domain (it is thecustomizewindows.net
in our case), we will change the name servers to point towards Hostgator’s Shared Account (if not already this is done). We will add thecustomizewindows.net
as add-on domain via Hostgator’s cPanel. We have a webfoot now. We will upload the feed.xml
file to thecustomizewindows.net
‘s public FTP root. So, this is available now :
---
1 | http://thecustomizewindows.net/feed.xml |
Does not matter whether you have a corresponding HTTPS url or not, we will continue to use the Feedburner url by login to Feedburner and changing the Feed source from :
1 2 | http:// thecustomizewindows.com/feed/ # wordpress default |
to :
1 | http://thecustomizewindows.net/feed.xml |
It fixes everything but the method demands manual deletion of the xml file and again copying the latest, pasting it. You can automate it using PHP (that should be a separate tutorial), but actually if you use the SSH feature of Hostgator, from command line it can not take a huge time :
1 2 3 4 5 6 7 8 9 10 11 12 | curl https://thecustomizewindows.com/feed/ > feed.xml # your computer, open the feed with nano nano feed.xml # copy all content after highlighting all text ssh -p 2222 tcwmedia@140.258.189.20 # shared server rm -r feed.xml # create new nano feed.xml # paste your new, hit ^ + O to save # done exit |
Alternatively you can use the cPanel’s web interface, quite boring work!
WordPress HTTPS and Feedburner : Easy Solution Has Fun With .htaccess
OK, we need to do 301 redirection from thecustomizewindows.net
from all except the thecustomizewindows.net/feed.xml
url, its quite easy, create a .htaccess file at FTP root of thecustomizewindows.net
and write kind of this :
1 2 3 4 | RewriteEngine On Rewritecond %{http_host} ^thecustomizewindows\.net [NC] RewriteCond %{REQUEST_URI} !/(feed)\.xml [NC] Rewriterule ^(.*)$ https://thecustomizewindows.com/$1 [L,R=301] |
Do not forget to change your domain name. Easy solution, not it? Automate it! You know about bash script or use cron! Commands are written => curl, overwrite. Just you need to set it on 15 minutes check for any change. If it was a VPS or cloud server we could use other sophisticated method.