Title: get_index_rel_link
Published: April 25, 2014
Last modified: August 20, 2026

---

# get_index_rel_link(): string

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#changelog)

This function has been deprecated since 3.3.0.

Get site index relational link.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#return)󠁿

 string

## 󠀁[Source](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#source)󠁿

    ```php
    function get_index_rel_link() {
    	_deprecated_function( __FUNCTION__, '3.3.0' );

    	$link = "<link rel='index' title='" . esc_attr( get_bloginfo( 'name', 'display' ) ) . "' href='" . esc_url( user_trailingslashit( get_bloginfo( 'url', 'display' ) ) ) . "' />\n";
    	return apply_filters( "index_rel_link", $link );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/deprecated.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/deprecated.php#L2743)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/deprecated.php#L2743-L2748)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#related)󠁿

| Uses | Description | 
| [user_trailingslashit()](https://developer.wordpress.org/reference/functions/user_trailingslashit/)`wp-includes/link-template.php` |

Retrieves a trailing-slashed string if the site is set for adding trailing slashes.

  | 
| [esc_attr()](https://developer.wordpress.org/reference/functions/esc_attr/)`wp-includes/formatting.php` |

Escaping for HTML attributes.

  | 
| [esc_url()](https://developer.wordpress.org/reference/functions/esc_url/)`wp-includes/formatting.php` |

Checks and cleans a URL.

  | 
| [get_bloginfo()](https://developer.wordpress.org/reference/functions/get_bloginfo/)`wp-includes/general-template.php` |

Retrieves information about the current site.

  | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

[Show 4 more](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#)

| Used by | Description | 
| [index_rel_link()](https://developer.wordpress.org/reference/functions/index_rel_link/)`wp-includes/deprecated.php` |

Display relational link for the site index.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/get_index_rel_link/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.3.0](https://developer.wordpress.org/reference/since/3.3.0/) | Deprecated.  | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fget_index_rel_link%2F)
before being able to contribute a note or feedback.