php - Indexing same URL in desktop and Smartphone for different Domain -


i created mobile version website www.m.example.com. put mobile code in directory named "mobile" put code in htaccess redirecting mobile vs desktop. how can index in google www.example.com both www.example.com , www.m.example.com. want block indexing subdomain page directly in google mobile version.

i blocked directory "mobile" indexing using robots.text. problem when searched in smartphone, url , title displayed correctly, snippet shows "the discription of item not available because of robots.text".

what want have www.example.com/category www.m.example.com/category. want index www.example.com/category page only. block www.m.example.com/category indexing. snippet should right.

now use <meta name="robots" content="noindex" /> in mobile pages. there hope?

you must use google webmasters tools/google search console

https://www.google.com/webmasters/tools/

you declare websites own , manage, , can hide or hilight webpages or subdomains want. can hide every m.example.com example.

good luck


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -