Forum Moderators: phranque

Message Too Old, No Replies

Can I install subdomain amp?

Can I install subdomain amp?

         

SafakB

10:00 pm on Nov 2, 2019 (gmt 0)

5+ Year Member



I want to install a subdomain amp, but I don't know how. Can you help with this?

tangor

6:12 am on Nov 3, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@SafakB ... Welcome to Webmasterworld!

Could you be a little more specific? Are you asking about AMP structured pages, or an APP?

tangor

6:13 am on Nov 3, 2019 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Secondary, is this for g seo/ads?

SafakB

11:50 am on Nov 3, 2019 (gmt 0)

5+ Year Member



amp system want to run subdomain completely

example.com/amp/ -> sub.example.com/amp/

however, when subdomain amp is entered, the home page should be opened

not2easy

1:04 pm on Nov 3, 2019 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If the domain's home page is to redirect to the /amp/ subdirectory, what is the purpose of not using the root directory for the /amp/ - or it is only for creating a /subdomain/ that is not available as a domain.tld? You can send all traffic to your subdomain but whether you can and whether you should are two different questions that can depend on the purpose of the plan.

The How-to part of that is dependent on using server configuration or .htaccess to manage.

phranque

12:37 am on Nov 4, 2019 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld [webmasterworld.com], SafakB!

reading between the lines, it sounds like you have an amp version of your site set up in the /amp/ subdirectory of the main site and you now want to access the amp site using a subdomain.

if this is the case, i would suggest making the home page of the amp site sub.example.com/ rather than sub.example.com/amp/
in order to do this, you must configure another virtual host for the subdomain which specifies the /.../amp/ directory as the document root directory.

i would also suggest configuring a 301 redirect so that requests for resources on the main domain with a url path starting like /amp/ should get redirected to the canonical url on the amp subdomain.