> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Add SEO to Your Router ## Article: About SEO and Routing ## Article Link: https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/routers/add-seo-to-your-router.md ## Article Content: # Add SEO to Your Router This article explains how to configure [SEO for your router pages](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/routers/about-routers.md#sitemap). There are two parts to setting up the SEO: 1. Create meta tags for Google to learn about your pages. 1. Create a sitemap for Google to use to find your pages. ## Step 1 | Set meta tags for router pages You set SEO meta tags for your router's pages in the `router()` function in [`routers.js`](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/routers/about-routers.md#routing-code): 1. Within the `router()` function, create an object that contains your desired SEO settings. This will become the [`HeadOptions`](https://www.wix.com/velo/reference/wix-router/wixrouterresponse/head) object that you pass to the router page. Use the provided sample code in the `router()` function as a starting point: ```javascript let seoData = {     title: data.title,     description: "This is a description of " + data.title + " page",     noIndex: false,     metaTags: {       "og:title": data.title,       "og:image": data.image,     },   }; ``` The example object contains several properties that are set using the data it retrieves in the `router()` function, including the following: - The `title` property, which contains the page’s SEO title. - The `description` property, which contains a short description of the page’s content. - A `noIndex` flag, set to `false`. This tells Google that it should index your page. - Additional meta tags contained in the `metaTags` property. You can add meta tags to this property. Keep or remove these properties, and add your own as needed. > **Note:** The `HeadOptions` object can also contain a `keywords` property, but Google ignores your site's keywords. 2. Once you’ve created your `HeadOptions` object, pass it to the `ok()` function as the third parameter. This object is then sent to the router page so that Google has SEO information for it. This sample code shows an example of passing the `HeadOptions` object defined above to **myRouter-page**: ```javascript return ok("myRouter-page", data, seoData); ``` ## Step 2 | Create the sitemap for your router To add your router pages to your sitemap, do the following: 1. In your router’s `sitemap()` function, create a [`WixRouterSitemapEntry`](https://dev.wix.com/docs/velo/api-reference/wix-router/wix-router-sitemap-entry.md) object for each URL the router can possibly route to. Use the sample code added to your first `sitemap()` function as a starting point: ```javascript let siteMapEntries = Object.keys(peopleData).map((name) => {     const data = peopleData[name];     let entry = new WixRouterSitemapEntry(name);     entry.pageName = "myRouter-page";     entry.url = "/myRouter/" + name;     entry.title = data.title;     return entry;   }); ``` Each `WixRouterSitemapEntry` in the example includes the router page’s URL, title, and name. The example code groups them into an array. 2. Return all the sitemap entries to create the router sitemap. Again, you can follow the example in the sample code: ```javascript return Promise.resolve(siteMapEntries); ``` ## Step 3 | Check your router sitemap To ensure that your sitemap is working properly, you can get the sitemap from your published site: 1. In a web browser, go to your published site's URL and append `/sitemap.xml` to it. For premium sites, if your site's published URL is: `https://mysite.com`, go to: `https://mysite.com/sitemap.xml`. For free sites, if your site's published URL is `https://username.wixsite.com/site-name`, go to `https://username.wixsite.com/site-name/sitemap.xml`. 2. Check that the sitemap matches the layout of your router pages. ## See also - [Create a router](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/routers/create-a-router.md) - [About routers](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/routers/about-routers.md) - [Tutorial: Create dynamic pages with a custom router](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/routers/tutorial-create-dynamic-pages-with-a-custom-router.md)