2

Is it possible to do paths redirects on wordpress.com (not a locally hosted wordpress) without using the VIP membership.

Context

I'm hosting some content on asciinema, this generates random URLs for you. I want to be able to link to this content while still being able to update it, so I need a level of indirection.

The normal solution to this is path redirects, but wordpress.com helpfully forces you to use their DNS servers for performance reasons. Is it possible to get their DNS to do path redirects?

Possible Approaches

I found this link here which refers to wordpress vip (https://vip.wordpress.com/documentation/vip/) and important as my 6 page wordpress page is, I don't think it justifies VIP membership.

I understand that it may be possible to mirror wordpresses DNS entries on your own nameserver... but this seems like effort.

I could of course use a different domain name (possibly a subdomain) and then have my own DNS for this (possibly from, say, cloudflare). Does wordpress support SOA and/or NS entries? I understand that cloudflare supports path redirects? update: Irritatingly it looks like wordpress.com does nut support assigning NS records through their web interfaces (wordpress.com path redirects) - this precludes using a third party for path redirection since it tends to be DNS providers who provide this service. A brief search failed to find any providers that would provide an endpoint (A record) that did redirection

1
  • Okay, so the approach I'm going for is using a very simple nginx server for a subdomain content.example.com and then using directs from this like so rewrite ^/test$ http://www.google.com/ redirect; (note that this is temporary redirect to allow redirection. This of course does rather defeat the load balancing benefits of using wordpress.
    – Att Righ
    Commented Apr 16, 2017 at 18:25

1 Answer 1

1

DNS cannot do redirects. DNS only tells which IP address to find the web server on. Even a CNAME entry in DNS is not a redirect. A CNAME simply says to use the same IP address as another website.

The webserver has to be configured to issue redirects. Once a request is made to the webserver, the webserver must respond with a redirect status such as 301 Permanent and a Location header with the destination of the redirect. For example: http://example.com/some/document.html

A redirect path is typically implemented in an .htaccess file using code like this:

Redirect Permanent /path/ http://example.com/foo/

However wordpress.com does not allow editing of .htaccess files.

Another way to tackle redirects would be to have the web application handle them. WordPress has many plugins that implement redirects.

However wordpress.com does not allow arbitrary plugins to be installed. Redirect plugins are only available through WordPress VIP, a paid service.

You will need hosting that is more flexible than wordpress.com if you want this feature on your website. Your options are:

  • Move to a different WordPress hosting company that allows plugins or .htaccess
  • Host a subdomain elsewhere where you can configure these redirects
  • Link to a URL shortener. There are some that allow you to edit the destination URL later.
2
  • > DNS cannot do redirects.
    – Att Righ
    Commented Jun 1, 2017 at 13:30
  • This is strictly true. Some providers blur the line between DNS and hosting a little (notably cloudflare - but I guess this is before they are forwarding).
    – Att Righ
    Commented Jun 1, 2017 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.