This project is read-only.

Google Webmaster verification

Topics: Administration, General, Troubleshooting
Oct 21, 2011 at 10:33 PM


Sorry if I'm posting this to the wrong section - I am trying to get my Orchard website verified with Google Webmaster central and I can't find a way to do it, tried everything I could think of!

Uploading the .html file to the ftp of my site doesn't work because the .html page only shows up on the ftp but not in the actual http address. And I have no idea where to put in the meta tags because I don't know where the HTML head of the document is. I tried a few different places but it didn't work. I used WebMatrix to customize and publish the site.

Could anyone please tell me whoch folder and file I should put the meta tag into or any alternative method I can use to get my page verified with Google, thanks!

Oct 21, 2011 at 11:01 PM

Copy paste the C:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Shapes\Views\Document.cshtml file to your theme. Edit it. Done.

Oct 22, 2011 at 9:03 PM

Yaay it worked! Thank you so much :)

Jan 27, 2014 at 7:05 AM
Edit document.cshtml to what? Why I couldn't get it work in Orchard 1.7?
Feb 19, 2014 at 5:22 AM
To add the header that Google wants.
Feb 15, 2015 at 8:07 AM
How do I edit the Document.cshtm file? Which items should I edit in this file?
Tell me soon,please.
Feb 15, 2015 at 8:17 AM
sebastienros wrote:
Copy paste the C:\Users\sebros\My Projects\Orchard\src\Orchard.Web\Core\Shapes\Views\Document.cshtml file to your theme. Edit it. Done.
Once you copied Document.cshtml to your theme as mentioned, you open the document with your favorite text editor and make the changes that you need as described by Google.
Feb 15, 2015 at 9:02 AM
I dont know which tag I must use for HTML verification file
give me an example , please.
for example googl give me "google-site-verification: google5fcc964129c52ba0.html" , Do I use special tag to put in?
I'm a new programmer, give me more description please.
Feb 15, 2015 at 9:47 AM
What are the exact instructions provided by Google? Did they tell you to add a <meta> tag?
Feb 15, 2015 at 10:21 AM
it's google instruction:
  1. Download this HTML verification file. [google1a0fc46c1dd9cf6e.html]
  2. Upload the file to
  3. Confirm successful upload by visiting in your browser.
  4. Click Verify below.
Feb 15, 2015 at 1:38 PM
I see. In that case, you don't need to modify Document.cshtml at all - simply upload the "google1a0fc46c1dd9cf6e.html" file to the website's root (where you also find global.asax). You'll need to update web.config in the root of your site (same level as where you uploaded your HTML file) by adding a static file handler to allow the uploaded HTML file to be served (Orchard by default maps all static file requests to the NotFound handler). For IIS7 and above, update your web.config as follows (only add the elements I annotated with comments - I left out other elements that you'll find, but you should not remove them):
        <!-- @nsafshar2000: the following is important: make sure accessPolicy is "Read, Script": -->
        <handlers accessPolicy="Read, Script">

            <!-- Clear all handlers, prevents executing code file extensions or returning any file contents. -->
            <clear />

            <!-- @nsafshar2000: this is important; add the following handler: -->
            <add name="GoogleVerification" path="google5fcc964129c52ba0.html" verb="*" modules="StaticFileModule" resourceType="File" requireAccess="Read" />
To summarize:
  1. Upload your file to your website's root.
  2. Modify the web.config in your website's root as explained above.