• example.com is hosted on IP address c.c.c.c at host1, no access any windows server admin at all
  • blog.example.com is on IP a.a.a.a at host2, full access to Linux server admin, using WordPress

So basically, I can fiddle with subdomain all I want.

I can't 301 redirect because the content on host 1 is an eCommerce site that I have no server control over. Can't put WordPress on it, can't run scripts, can't do anything on the server period.

Is there a method to "mask" all the URLs on root blog.example.com so they appear as example.com/blog/ folder?

They can't actually be sent to example.com/blog/ as that doesn't exist. It just needs to look to the surfer as if they are there.

Can this be done with some kind of masking or something?

Will this be better for SEO as hopefully search engines will see the blog in a directory on the main domain?

2 Answers 2


If you don't control example.com in any way, there's no way to make blog.example.com appear as any part of it except for the part of the .example.com namespace that's been delegated to you.

With that said, here are some ideas if you have even some basic HTML editing available to you on example.com:

1) Embed an <iframe src="blog.example.com"> on that page example.com/blog. Iframes can be tricky to size responsively, but it's one way to completely mask the URL. Regular frames can work as well.

2) Consider an http meta refresh tag (which is like a 301) which will be slightly slower than a 301 (since it's being loaded in the web page itself). For example, the contents of example.com/blog/index.html could (instead of a frame) be:

<meta http-equiv="refresh" content="0; url=http://blog.example.com/">

Your subdomain for the blog is fine. There is no need to move it to a subdirectory. A subdomain can be just as good for SEO as a subdirectory. I host my blog on a "blog" subdomain.

The only server that can possibly control what it served on the /blog folder of your main site is the server where your main DNS record is pointing: your eCommerce server. If you had access to that server you could implement a number things such as redirects, frames, or a reverse proxy. Without the ability to control anything on that server, your options are very limited.

The only workaround would be to use a third server. That server would work as a reverse proxy. You would point your DNS record at the reverse proxy. That proxy machine would then be configured to relay information from the blog subdomain when it gets a request in the \blog directory, and relay from the main site the rest of the time. Apache's mod proxy is commonly used for this purpose as well as Nginx's HttpProxyModule.

Such a solution is a pain to set up, slows the site down some what, and has additional hosting costs. I wouldn't recommend it over the subdomain solely for SEO reasons.


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.